damianh / LibLog

LibLog is a single file for you to either copy/paste or install via nuget, into your library/framework/application to provide a logging abstraction.
MIT License
929 stars 153 forks source link

Fixed bug where NLogLogProvider performs reflections for all log… #233

Closed snakefoot closed 4 years ago

snakefoot commented 5 years ago

Fixes performance bug introduced with #200 (Performs reflection on every logevent. Performs reflection on every logger-object-creation).

Updates NLog-test-project dependency to NLog 4.6 (Changed the NLog-test-project to use MDLC + NDLC instead). Handling the breaking change introduced in #181

This PR is not a breaking change.

snakefoot commented 5 years ago

@damianh Found that #200 by @jesperll introduced reflection-logic when ever logging an event:

https://github.com/damianh/LibLog/blob/74e53f70bb7942a6953a2f8460e5755549b0e4eb/src/LibLog/LogProviders/NLogLogProvider.cs#L198

It also performs reflection logic in constructor when ever creating a Logger-object:

https://github.com/damianh/LibLog/blob/74e53f70bb7942a6953a2f8460e5755549b0e4eb/src/LibLog/LogProviders/NLogLogProvider.cs#L191-L195

I have now fixed both issues. Removing memory allocation issues and performance hit.

304NotModified commented 5 years ago

Polite bump @damianh

snakefoot commented 5 years ago

@damianh Another polite bump. Would be nice to fix the regression introduced with LibLog ver. 5.0.5

snakefoot commented 5 years ago

@damianh Yet another ping pong

snakefoot commented 5 years ago

@damianh Another polite bump to have this bug-fix merged and released.

304NotModified commented 5 years ago

@damianh please accept this PR. Snakefoot is one of the core contributors of NLog and so you could merge this one with confidence.

If this PR need some changes, please also let us know.

snakefoot commented 5 years ago

@damianh How is the calendar looking? Any room available for merging this PR?

damianh commented 4 years ago

Thanks for PR and patience. Will release this asap.

snakefoot commented 4 years ago

Thank you for merging. Looking forward to the final and last release of LibLog.

snakefoot commented 4 years ago

Created #271 as a bonus PR to close down a few more issues before version 5.0.7