Skip to content

Added "Properties" property on Logger for reading and editing properties.#3430

Merged
304NotModified merged 3 commits intoNLog:release/4.6.4from
snakefoot:DictionaryCopyOnWrite
May 28, 2019
Merged

Added "Properties" property on Logger for reading and editing properties.#3430
304NotModified merged 3 commits intoNLog:release/4.6.4from
snakefoot:DictionaryCopyOnWrite

Conversation

@snakefoot
Copy link
Copy Markdown
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
@snakefoot snakefoot force-pushed the DictionaryCopyOnWrite branch from ee33f0e to ee168fb Compare May 25, 2019 18:32
@codecov-io
Copy link
Copy Markdown

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

Comment thread src/NLog/Logger.cs Outdated
@snakefoot
Copy link
Copy Markdown
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
@304NotModified 304NotModified force-pushed the DictionaryCopyOnWrite branch from 7489261 to c13849c Compare May 27, 2019 20:59
@snakefoot
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

snakefoot commented May 28, 2019 via email

@snakefoot
Copy link
Copy Markdown
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
Copy Markdown
Member

thanks, it's anyway in the changelog.

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

@snakefoot
Copy link
Copy Markdown
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
Copy Markdown
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.

3 participants