Skip to content

Commit

Permalink
Update NLogExtension.cs
Browse files Browse the repository at this point in the history
Solves Issue 2 unitycontainer#2
  • Loading branch information
janschreier authored Feb 18, 2020
1 parent 63ea87c commit 0395405
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NLogExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public ResolveDelegate<BuilderContext> GetResolver(ref BuilderContext context)
var method = GetName ?? _defaultGetName;
Type declaringType = context.DeclaringType;

return (ref BuilderContext c) => LogManager.GetLogger(method(declaringType));
return (ref BuilderContext c) =>
{
var declaringType = c.DeclaringType;
return LogManager.GetLogger(method(declaringType));
};
}
}
}

0 comments on commit 0395405

Please sign in to comment.