-
Notifications
You must be signed in to change notification settings - Fork 9
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
Set Elmah source and user #29
Conversation
This commit will add two options: - LoggerNameAsSource will set the loggers name as source - IdentityNameAsUser will set the identity user as user
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
=======================================
- Coverage 85.71% 80% -5.72%
=======================================
Files 1 1
Lines 21 30 +9
Branches 6 12 +6
=======================================
+ Hits 18 24 +6
Misses 2 2
- Partials 1 4 +3
Continue to review full report at Codecov.
|
I;m sorry for the delay on this |
NLog.Elmah/ElmahTarget.cs
Outdated
/// <summary> | ||
/// Use <see cref="LogEventInfo.LoggerName"/> as source if <see cref="LogEventInfo.Exception"/> is <c>null</c>. | ||
/// </summary> | ||
public bool LoggerNameAsSource { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make it a Layout that is initially assigned to ${exception:format=Source:whenEmpty=${logger}}
? (Requires dependency update to NLog 4.6.7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea :)
Bumps [NLog](https://github.com/NLog/NLog) from 4.0.1 to 4.6.7. - [Release notes](https://github.com/NLog/NLog/releases) - [Changelog](https://github.com/NLog/NLog/blob/v4.6.7/CHANGELOG.md) - [Commits](NLog/NLog@4.0.1...v4.6.7) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Thanks a lot! |
https://www.nuget.org/packages/NLog.ELMAH ver. 4.1 has been released (Changed setting name "Source" to "LogSource") |
This PR will add two options:
We wanted to be able to set source and user to the Elmah table, so wie added these two options. Seems related to #7.