Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added public method to configure the NLog ServiceLocator #273

Merged
merged 2 commits into from
Apr 11, 2018

Conversation

snakefoot
Copy link
Contributor

Attempt to resolve #270

@codecov
Copy link

codecov bot commented Apr 9, 2018

Codecov Report

Merging #273 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #273   +/-   ##
=====================================
  Coverage      57%    57%           
=====================================
  Files          31     31           
  Lines         407    407           
  Branches       92     92           
=====================================
  Hits          233    233           
  Misses        138    138           
  Partials       36     36

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52aeec9...77a0ec7. Read the comment docs.

Copy link

@timdoke timdoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly what I needed. Thanks!

{
ServiceLocator.ServiceProvider = serviceProvider;
ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
LogManager.AddHiddenAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe reuse gettypeinfo/assembly for both calls?

@304NotModified
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASP.NET Core ASP.NET Core - all versions feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom provider for NLog doesn't wire up aspnet web layouts due to ServiceLocator pattern
3 participants