Registration asp.net is a common (logging) interface and protocol implementation.
You can use a common interface and a third-party library (for example, NLog) together, since the infrastructure is prepared for this.
If you charge NLog for the built-in logging implementation, you win:
- on-the-fly configuration change (when starting the application without rebooting)
- more goals (e.g. database, file). There is no built-in built-in target: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging . The mail target in NLog is not yet set to netstandard, but it is planned.
- additional parameters in the targets (for example, file archiving)
- Record additional context information, for example
${processid} - since we invest a lot in performance optimization, I would expect performance.
- asynchronous logging - which is not known in the asp.net protocol, as far as I know.
- advanced features such as buffering, backing up and restricting your logs, filtering conditions with context information, recording simultaneously with one file, etc.
- NLog is easier to expand (not only target, but also renderings of layouts, layouts, etc.).
- structural logging capability (Serilog, NLog 4.5)
But, as always, if you do not need these functions, perhaps fewer (libraries) more.
source share