-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Introduced LogEventBuilder instead of NLog.Fluent.LogBuilder #4325
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
from
February 27, 2021 13:24
f7da340
to
4c2a976
Compare
snakefoot
changed the title
Introduced ILoggerBasic to replace ILogger. Introduced LogEventBuilder
Introduced ILog to replace ILogger
Feb 27, 2021
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
from
February 27, 2021 13:31
4c2a976
to
920a703
Compare
snakefoot
changed the title
Introduced ILog to replace ILogger
Introduced ILog as light alternative to ILogger
Feb 27, 2021
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
from
March 1, 2021 07:33
920a703
to
c18df30
Compare
23 tasks
If #3366 becomes true, then it doesn't make sense to introduce a new interface, that will be removed with NLog 6.0 Guess I will just have just to live with the pain, and change the new LogEventBuilder to work with the very ugly |
snakefoot
changed the title
Introduced ILog as light alternative to ILogger
Introduced LogEventBuilder instead of NLog.Fluent.LogBuilder
Mar 17, 2021
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
from
March 17, 2021 17:13
3d04287
to
5f4b031
Compare
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
2 times, most recently
from
March 17, 2021 21:50
4071c44
to
afa3639
Compare
snakefoot
force-pushed
the
ILoggerBasicBuilder
branch
from
March 18, 2021 22:49
e58c23b
to
5c1da65
Compare
SonarCloud Quality Gate failed. |
This was referenced Mar 23, 2021
snakefoot
added
the
breaking change
Breaking API change (different to semantic change)
label
Mar 27, 2021
Created wiki-page: https://github.com/NLog/NLog/wiki/Fluent-Logger-API |
snakefoot
added
the
documentation done
all docs done (wiki, api docs, lists on nlog-project.org, xmldocs)
label
Nov 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
Breaking API change (different to semantic change)
documentation done
all docs done (wiki, api docs, lists on nlog-project.org, xmldocs)
feature
needs documentation on wiki
performance
size/XXL
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces LogEventBuilder as replacement for Fluent.LogBuilder. Alternative to #4044 that skips obsolete of ILogger-interfaces
Obsoleted the old fluent
LogBuilder
and introducedLogEventBuilder
that is available without needing to writeusing NLog.Fluent
. The interfaces are very similar, but the start method is a little different:logger.Info().Message("Hello").Write();
logger.ForInfoEvent().Message("Hello").Write();
I guess one could change
LogEventBuilder
to be activated from usingInfo()
but it would generate more noise about ambiguous extensions-methods. But actually I likeForInfoEvent()
since it signals that one is starting to define a LogEvent.Also unsure if I like the
Write()
-method. Think I prefer.Log()
but then the transformation would not be that easy:logger.ForInfoEvent().Message("Hello").Log();
The major improvement in
LogEventBuilder
is there is no allocation if the LogLevel is not enabled. And when the LogLevel is enabled, then it no longer allocates an additionalLogBuilder
-object (BecauseLogEventBuilder
is a struct on the stack). Resolves #532