LighterLog 1.2.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package LighterLog --version 1.2.1
NuGet\Install-Package LighterLog -Version 1.2.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LighterLog" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LighterLog --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LighterLog, 1.2.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LighterLog as a Cake Addin #addin nuget:?package=LighterLog&version=1.2.1 // Install LighterLog as a Cake Tool #tool nuget:?package=LighterLog&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LightLog
A lightweight logger created with dependency injection in mind. It is done for the most part.
Loggers
There are different kinds of loggers that come packed. Here they are and their differences:
- The basic logger
Logger
: This logger has the most flexibility as it is single-threaded. It is also the only one capable of having its output redirected to another TextWriter. - The async logger
AsyncLogger
: It has the same capabilities as the basic logger but is unable to have its output redirected. When a thread logs using this logger, it will begin a task that adds the message to a blocking collection backed by a concurrent queue that is constantly emptied by an independent thread. The thread that writes to the TextWriter is blocked while there are no queued logs. - The toggle logger
ToggleLogger
: Backed by any kind of other ILogger, comes with an internal boolean state that determines whether or not a log will happen. Has a backing ILogger that all methods are delegated to. To get this, use the "UseForDebugging" extension method available to all ILogger implementations. This one can be good for debugging. One example of using this logger for debugging is using the DEBUG preprocessor flag to enable logging, otherwise leave disabled. The only loss in performance at that point is a boolean check that is guaranteed to be false. If the boolean is guaranteed to be false, so is the return type. That means the JIT will most likely optimize it so it doesn't affect anything.
The package can be found on NuGet here
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.