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 "Properties" property on Logger for reading and editing properties. #3430

Merged
merged 3 commits into from May 28, 2019

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented May 25, 2019

Logger - Properties added using WithProperty can now be inspected safely

Alternative implementation of #3424 to fix #3422

Also resolves partly #2960 (Still doesn't resolve use of SimpleLayout that are not threadsafe). And there will now be a performance-hit if very aggressive about modifying NLog-variables, and have many of them.

@snakefoot snakefoot force-pushed the DictionaryCopyOnWrite branch 2 times, most recently from 5e206dc to ee33f0e Compare May 25, 2019 18:27
@codecov-io
Copy link

codecov-io commented May 25, 2019

Codecov Report

Merging #3430 into release/4.6.4 will decrease coverage by <1%.
The diff coverage is 70%.

@@              Coverage Diff               @@
##           release/4.6.4   #3430    +/-   ##
==============================================
- Coverage             80%     80%   -<1%     
==============================================
  Files                358     359     +1     
  Lines              28514   28634   +120     
  Branches            3813    3817     +4     
==============================================
+ Hits               22825   22913    +88     
- Misses              4589    4621    +32     
  Partials            1100    1100

src/NLog/Logger.cs Outdated Show resolved Hide resolved
@snakefoot
Copy link
Contributor Author

snakefoot commented May 25, 2019

@304NotModified when sharing the same loggers accross multiple classes.

Should say:

when same named logger is used at multiple locations or shared by different thread contexts.

@304NotModified 304NotModified changed the title Logger - Properties added using WithProperty can now be inspected safely Added "Properties" property on Logger for reading and editing properties. May 25, 2019
@snakefoot
Copy link
Contributor Author

@304NotModified Guess this is the last bullet before NLog 4.6.5? Think it would be great to have #3414 resolved :)

@304NotModified 304NotModified merged commit 6a11392 into NLog:release/4.6.4 May 28, 2019
@304NotModified
Copy link
Member

304NotModified commented May 28, 2019

@304NotModified Guess this is the last bullet before NLog 4.6.5? Think it would be great to have #3414 resolved :)

Yes indeed :) (I assume you mean 4.6.4)

@snakefoot
Copy link
Contributor Author

snakefoot commented May 28, 2019 via email

@snakefoot
Copy link
Contributor Author

snakefoot commented May 28, 2019 via email

304NotModified pushed a commit that referenced this pull request May 28, 2019
…ies. (#3430)

* Logger - Properties added using WithProperty can now be inspected safely

* small code improvement
@304NotModified 304NotModified added this to the 4.6.4 milestone May 28, 2019
@304NotModified
Copy link
Member

thanks, it's anyway in the changelog.

offtopic: What is <tel:4.6.4> ? ;)

@snakefoot
Copy link
Contributor Author

offtopic: What is tel:4.6.4 ? ;)

When I reply to Github-issues from the Email-program on my phone, then strange things happens.

@304NotModified
Copy link
Member

LOL

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

Successfully merging this pull request may close these issues.

None yet

3 participants