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

ConfigureNLog should not be used together with UseNLog #257

Merged
merged 1 commit into from
Mar 25, 2018

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Mar 11, 2018

UseNLog together with ConfigureNLog will generate duplicate logging (builder.AddNLog will register a second time).

See also:

https://stackoverflow.com/questions/33613971/nlog-logs-error-twice-in-same-file
https://stackoverflow.com/questions/42589841/how-can-i-stop-nlog-from-double-logging

I guess registering an ILoggerFactory as singleton (That ignores any calls to AddProvider) would also solve the issue (Making it more difficult to configure wrong). See also #235

…ate duplicate logging (builder.AddNLog will register a second time)
@snakefoot snakefoot changed the title ConfigureNLog should not be used together with UseNLog. ConfigureNLog should not be used together with UseNLog Mar 11, 2018
@codecov
Copy link

codecov bot commented Mar 11, 2018

Codecov Report

Merging #257 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #257   +/-   ##
=====================================
  Coverage      57%    57%           
=====================================
  Files          31     31           
  Lines         407    407           
  Branches       92     92           
=====================================
  Hits          233    233           
  Misses        138    138           
  Partials       36     36
Impacted Files Coverage Δ
...eb.AspNetCore/Internal/RequestAccessorExtension.cs 100% <100%> (ø) ⬆️

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 86739af...3682cad. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants