Closed TIPConsulting closed 3 years ago
I've reviewed your changes and here are my notes:
--
I appreciate your wiliness to contribute a new capability, but as a package maintainer I cannot accept this PR. If you need to have scopes I think it would be better to use your own build of the logger.
Finally: Noted. Next time I won't bother
Thank you for all your efforts -- after all, you've implemented scopes for yourself b/c you need them.
Open source is a good: you always can use your own fork with modifications that are needed for your project.
I have implemented scope support using a combination of code from the following: https://www.meziantou.net/asp-net-core-json-logger.htm https://www.codeproject.com/Articles/1556475/How-to-Write-a-Custom-Logging-Provider-in-ASP-NET
In addition, my new additions follow the 3 scope semantics outlined in this blog: https://nblumhardt.com/2016/11/ilogger-beginscope/
I have also included full xml comments and doc file. I also took the liberty of adding SourceLink configuration to allow downstream implementers to step through this project with a debugger if needed.
There are no breaking changes. All old tests still pass with no modifications. I have added new tests to demonstrate the use of scopes. By default, the standard logging output is unchanged. Users may write scope information to output by setting a custom callback for FileLoggerOptions.FormatLogEntry