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

Set Elmah source and user #29

Merged
merged 4 commits into from
Jul 3, 2020
Merged

Conversation

XF9
Copy link
Contributor

@XF9 XF9 commented Feb 7, 2020

This PR will add two options:

  • LoggerNameAsSource: will set the loggers name as source
  • IdentityNameAsUser: will set the identity user as user

We wanted to be able to set source and user to the Elmah table, so wie added these two options. Seems related to #7.

This commit will add two options: 
- LoggerNameAsSource will set the loggers name as source 
- IdentityNameAsUser will set the identity user as user
@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #29 into master will decrease coverage by 5.71%.
The diff coverage is 66.66%.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
NLog.Elmah/ElmahTarget.cs 80% <66.66%> (-5.72%) ⬇️

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 2694548...ed49b7d. Read the comment docs.

@304NotModified 304NotModified self-assigned this Feb 10, 2020
@304NotModified
Copy link
Member

I;m sorry for the delay on this

@304NotModified 304NotModified added this to the 4.1 milestone Mar 30, 2020
/// <summary>
/// Use <see cref="LogEventInfo.LoggerName"/> as source if <see cref="LogEventInfo.Exception"/> is <c>null</c>.
/// </summary>
public bool LoggerNameAsSource { get; set; }
Copy link
Contributor

@snakefoot snakefoot Mar 30, 2020

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)

Copy link
Member

Choose a reason for hiding this comment

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

Smart one!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea :)

dependabot-preview bot and others added 2 commits May 4, 2020 12:37
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>
@304NotModified 304NotModified merged commit c78b03e into NLog:master Jul 3, 2020
@304NotModified
Copy link
Member

Thanks a lot!

@snakefoot
Copy link
Contributor

snakefoot commented Sep 9, 2023

https://www.nuget.org/packages/NLog.ELMAH ver. 4.1 has been released (Changed setting name "Source" to "LogSource")

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

Successfully merging this pull request may close these issues.

4 participants