Lettuce.Log.Core
4.0.0
dotnet add package Lettuce.Log.Core --version 4.0.0
NuGet\Install-Package Lettuce.Log.Core -Version 4.0.0
<PackageReference Include="Lettuce.Log.Core" Version="4.0.0" />
<PackageVersion Include="Lettuce.Log.Core" Version="4.0.0" />
<PackageReference Include="Lettuce.Log.Core" />
paket add Lettuce.Log.Core --version 4.0.0
#r "nuget: Lettuce.Log.Core, 4.0.0"
#:package Lettuce.Log.Core@4.0.0
#addin nuget:?package=Lettuce.Log.Core&version=4.0.0
#tool nuget:?package=Lettuce.Log.Core&version=4.0.0
Lettuce.Log.Core
The core of the logging system to allow for ease of formatting logs and sending them to various destinations
Quick Start
Lettuce.Log.Core is available on nuget
// use global logger
Log.Logger.AddDestination(...);
Log.Logger.AddFormatter(...);
Log.Info("This is an information message");
Log.Error("This is an error message");
// or instantiate your own logger
Logger logger = new Logger(Log.DEFAULT_TEMPLATE);
Logger
Logger objects are where you log messages to certain LogEventLevel. They are also the collection of ILogFormatter and ILogDestination objects.
There is also a statically wrapped Logger called Log to allow for quick and global logging around your systems without having to pass a Logger instance around
ILogFormatter
These objects format the log messages that come in. Each logger when constructing takes in a template for how the log message should be formatted before being fully logged. These templates are essentially keys to look in a string to insert the formatted string you want.
For example, here is the default template: {Level} {Message}
By default, Logger has the following formatters that get run for each log:
| Template | Content
| -------- | ---------------------
| {Message}| The log message
| {Level} | The logging level of the message
ILogDestination
These object take formatted log messages and logs them somewhere. How they get logged depends on the implementation, check out these commonly used destinations here:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
-
net10.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Lettuce.Log.Core:
| Package | Downloads |
|---|---|
|
Lettuce.Log.File
Logging destination that writes to a file |
|
|
Lettuce.Log.Console
Logging destination that writes to the System.Console with colors |
GitHub repositories
This package is not used by any popular GitHub repositories.