{"repo":"nreco/logging","free":true,"listed":false,"github":"https://github.com/nreco/logging","clone":"git clone https://github.com/nreco/logging.git","description":"Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies","language":"C#","stars":335,"topics":["dotnet-core","logging","file"],"license":"MIT","category":"analytics","readme_excerpt":"NReco.Logging.File Simple and efficient file logger provider for .NET Core (NET6+, NET10, NET11) without any additional dependencies. NuGet Tests --- --- very similar to standard ConsoleLogger but writes to a file can append to existing file or overwrite log file on restart supports a 'rolling file' behaviour and can control total log size it is possible to change log file name on-the-fly suitable for intensive concurrent usage: has internal message queue to avoid threads blocking optimized low-allocation default log messages formatting suitable for intensive usage How to use Add NReco.Logging.File package reference and initialize a file logging provider in services.AddLogging (Startup.cs): or Example of the configuration section in appsettings.json: Logging scopes Logging scopes can be included in the default log entry format by setting FileLoggerOptions.IncludeScopes to true (the default is false ): Active scopes are written from outermost to innermost before the message, for example: = Request 123 = Processing order . A custom FormatLogEntry handler replaces this format entirely and can render scopes itself with LogMessage.ScopeProvider , which is also gated by IncludeScopes . Rolling File This feature is activated with FileLoggerOptions properties: FileSizeLimitBytes and MaxRollingFiles . Lets assume that file logger is configured for \"test.log\": if only FileSizeLimitBytes is specified file logger will create \"test.log\", \"test1.log\", \"test2.log\" etc use MaxRollingFiles in","default_branch":null,"files":null,"tree":[],"storefront":"/r/nreco","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nreco/logging/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}