LoggerLite 5.0.0
dotnet add package LoggerLite --version 5.0.0
NuGet\Install-Package LoggerLite -Version 5.0.0
<PackageReference Include="LoggerLite" Version="5.0.0" />
<PackageVersion Include="LoggerLite" Version="5.0.0" />
<PackageReference Include="LoggerLite" />
paket add LoggerLite --version 5.0.0
#r "nuget: LoggerLite, 5.0.0"
#:package LoggerLite@5.0.0
#addin nuget:?package=LoggerLite&version=5.0.0
#tool nuget:?package=LoggerLite&version=5.0.0
LoggerLite 
| Integrations | |
|---|---|
| Nuget | |
| Build | |
| Coverage |
Why?
Many programming tasks are reducible or somehow related to logging information. Tracing all the different implementations or handling concurency issues can be a nuisance. While there are many great, full-featured solutions, they are either not portable, bloated or hard to grasp. If you need lightweight, extensible and easy to understand logging solution, this is a library for you. Unit tests cover most of the codeline, there are no external dependencies and all relevant cade takes around 15 KB / 350 LOC. The LoggerLite is a .NET Core and .NET classic compatible solution, featuring one interface ILogger, handfull of implementations and a passive debouncer. The solution is a thin wrapper around .NET FileStreaming, XDocument, Console and other classes. Currently, the project contains following implementations:
- Console Logger
- Debug Trace Logger
- File Logger
- XML Logger
- YAML Logger
- JSON Logger
- HTML Logger
How?
The example of console logger:
using System;
using LoggerLite;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var logger = new ConsoleLogger();
logger.LogInfo("info!");
logger.LogWarning("warning");
logger.LogError("error :(");
Console.ReadKey();
}
}
}
The example of yaml logger or any file logger based on FileLoggerBase:
using System;
using LoggerLite;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var logger = new YamlFileLogger("yamlLog.yaml");
logger.LogInfo("info");
logger.LogWarning("warning");
logger.LogError("error");//no need to call save, it flushes automatically
Console.ReadKey();
}
}
}
The example of HTML logger:
using System;
using LoggerLite;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var outputFile = new FileInfo(Path.ChangeExtension(Path.GetRandomFileName(), "html"));
var logger = new HtmlLogger();
logger.LogWarning("warning");
logger.LogWarning("warning");
logger.LogWarning("warning");
logger.LogWarning("warning");
logger.LogInfo("info");
logger.LogWarning("warning");
logger.LogError("error, but not really:)");
logger.Save(outputFile);
using (var process = Process.Start(new ProcessStartInfo
{ FileName = outputFile.FullName, UseShellExecute = true }))
}
}
}
Contributions are welcomed
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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 was computed. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. 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.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on LoggerLite:
| Package | Downloads |
|---|---|
|
ExceptionHandlingStrategies
Exceptions are irrelevant, untill they occur. Then, they are absolutely central. A mundane task of adding the same behaviour of displaying the error message to the screen or logging it to file or event log is wasteful and can lead to errors. The package reduces the amount of bloat to zero using strategy pattern (a.k.a. policy-based design). Package provides .NET Standard Infrastructure (.NET Core & .NET Classic comaptible) for creating error handling policy classes with couple of basic implementations: Log exception policy Collect and ignore exception policy Ignore exception policy Aggregated wrapper for exception policies Customizable exception filter |
|
|
Stocks.Data.Services
High level services that will help you manipulate stock data. StocksFileProvider, StocksDeserializer, StocksBulkDeserializer |
|
|
SimpleML.GeneticAlgorithm
Simple Genetic Algorithm implementation |
|
|
LoggerLite.EventLog
Log your precious error info, warnings and information to Windows Event Log. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0 | 0 | 6/14/2026 |
| 4.0.0 | 1,774 | 10/7/2024 |
| 3.3.0 | 9,162 | 7/13/2022 |
| 3.2.0 | 1,062 | 7/12/2022 |
| 3.1.0 | 1,888 | 3/23/2019 |
| 3.0.0 | 1,648 | 10/4/2018 |
| 3.0.0-beta | 1,378 | 10/2/2018 |
| 2.5.0 | 1,615 | 9/30/2018 |
| 2.4.0 | 1,548 | 9/30/2018 |
| 2.3.0 | 2,454 | 3/29/2018 |
| 2.2.0 | 2,059 | 2/18/2018 |
| 2.1.0 | 1,771 | 2/17/2018 |
| 2.0.0 | 2,437 | 1/21/2018 |
| 1.0.1 | 3,159 | 6/7/2017 |
| 1.0.0 | 6,182 | 6/7/2017 |
Multi-target netstandard2.0 and net8.0. Fixed success double-counting (ConsoleLogger, QueuedLoggerWrapper), invalid JSON output (JsonFileLogger now escapes), and a leaked timer in ActiveDebouncer. Added correctly-spelled ILogger.Successes; the misspelled Sucesses is now [Obsolete] and will be removed in a future major version.