KissLog 5.2.0
Prefix ReservedSee the version list below for details.
dotnet add package KissLog --version 5.2.0
NuGet\Install-Package KissLog -Version 5.2.0
<PackageReference Include="KissLog" Version="5.2.0" />
paket add KissLog --version 5.2.0
#r "nuget: KissLog, 5.2.0"
// Install KissLog as a Cake Addin #addin nuget:?package=KissLog&version=5.2.0 // Install KissLog as a Cake Tool #tool nuget:?package=KissLog&version=5.2.0
KissLog
KissLog is the built-in .NET integration for saving the logs to logBee.net.
Check the documentation for a complete list of features.
.NET support
- .NET 6 Web App
- .NET 6 Console App
- .NET Core Web App
- .NET Core Console App
- ASP.NET MVC
- ASP.NET WebApi
- .NET Framework Console App
Why KissLog?
KissLog implements three main components: logging functionality, exceptions tracking and application insights.
For web applications, KissLog automatically captures all the HTTP properties.
KissLog keeps the log events in memory and sends them to the registered listeners all at once. This can help reduce the load of the persistence implementation (such as Disk I/O, database operations or network throughput).
Centralized logging using logBee.net or logBee on-premises app.
<table><tr><td> <img alt="logBee.net centralized logging" width="600" src="https://github.com/KissLog-net/KissLog.Sdk/assets/39127098/583ff625-d0ce-4ebc-b0d7-9a3b0257d3ef" /> </td></tr></table>
Basic usage
using KissLog;
using KissLog.Listeners.FileListener;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
KissLogConfiguration.Listeners
.Add(new LocalTextFileListener("logs", FlushTrigger.OnFlush));
var logger = new Logger();
logger.Trace("Hey, I am a log message");
Logger.NotifyListeners(logger);
}
}
}
Saving the logs
KissLog saves the logs to multiple output locations by using log listeners.
Log listeners are registered at application startup using the KissLogConfiguration.Listeners
container.
Custom log listeners can be easily implemented.
Using interceptors, log listeners can apply conditional filtering rules before saving the events.
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
KissLogConfiguration.Listeners
.Add(new LocalTextFileListener("logs", FlushTrigger.OnMessage))
.Add(new CustomMongoDbListener("mongodb://localhost:27017", "Logs")
{
Interceptor = new LogLevelInterceptor(LogLevel.Information)
});
var logger = new Logger();
logger.Trace("Hey, I am a log message");
Logger.NotifyListeners(logger);
}
}
}
Configuration
KissLog supports various configuration options using the KissLogConfiguration.Options
configuration object.
private void ConfigureKissLog
{
KissLogConfiguration.Options
.AppendExceptionDetails((Exception ex) =>
{
if (ex is DivideByZeroException zeroDivisionEx)
return ">>> Should check if the denominator is zero before dividing";
return null;
});
}
Samples
Check the test applications for more examples of using KissLog.
Feedback
Please use the issues section to report bugs, suggestions and general feedback.
Contributing
All contributions are very welcomed: code, documentation, samples, bug reports, feature requests.
License
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. |
.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 is compatible. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 is compatible. net472 was computed. net48 was computed. net481 is compatible. |
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. |
-
.NETFramework 4.6.2
- System.Text.Json (>= 8.0.3)
-
.NETFramework 4.7.1
- System.Text.Json (>= 8.0.3)
-
.NETFramework 4.8.1
- System.Text.Json (>= 8.0.3)
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.3)
-
.NETStandard 2.1
- System.Text.Json (>= 8.0.3)
-
net6.0
- System.Text.Json (>= 8.0.3)
-
net7.0
- System.Text.Json (>= 8.0.3)
-
net8.0
- System.Text.Json (>= 8.0.3)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on KissLog:
Package | Downloads |
---|---|
KissLog.AspNetCore
KissLog .NET and ASP.NET Core package. Install this package on .NET and ASP.NET Core applications. |
|
KissLog.CloudListeners
logBee.net REST client. |
|
KissLog.AspNet.Web
KissLog Web package. You should not manually install this package, as it will be installed as a dependency. |
|
KissLog.AspNet.WebApi
KissLog ASP.NET WebApi package. Install this package on ASP.NET WebApi applications. |
|
KissLog.RestClient
logBee.net REST client. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
5.3.1 | 510 | 10/16/2024 |
5.3.0 | 1,272 | 8/12/2024 |
5.2.0 | 2,702 | 5/3/2024 |
5.1.2 | 46,140 | 5/2/2022 |
5.1.1 | 20,076 | 12/27/2021 |
5.1.0 | 2,864 | 12/26/2021 |
5.0.0 | 4,826 | 11/6/2021 |
4.1.0 | 41,726 | 1/31/2021 |
4.0.0 | 11,669 | 9/21/2020 |
3.5.6 | 9,841 | 3/3/2020 |
3.5.5 | 4,334 | 12/13/2019 |
3.5.2 | 5,513 | 11/22/2019 |
3.5.1 | 17,157 | 10/16/2019 |
3.5.0 | 3,633 | 10/12/2019 |
3.4.0 | 9,004 | 7/5/2019 |
3.3.0 | 4,182 | 6/19/2019 |
3.2.0 | 4,687 | 5/19/2019 |
3.1.1 | 5,043 | 3/27/2019 |
3.1.0 | 4,626 | 3/26/2019 |
3.0.0 | 4,135 | 3/15/2019 |
2.8.0 | 4,941 | 11/13/2018 |
2.7.0 | 4,841 | 11/7/2018 |
2.6.0 | 3,822 | 10/20/2018 |
2.5.4 | 4,636 | 8/14/2018 |
2.5.3 | 3,869 | 8/13/2018 |
2.5.2 | 3,893 | 8/11/2018 |
2.5.1 | 5,028 | 7/25/2018 |
2.5.0 | 3,831 | 7/25/2018 |
2.4.2 | 3,349 | 6/12/2018 |
2.4.1 | 5,214 | 5/15/2018 |
2.4.0 | 4,515 | 5/9/2018 |
2.3.5 | 3,890 | 5/7/2018 |
2.3.4 | 4,051 | 5/4/2018 |
2.3.3 | 3,337 | 4/27/2018 |
2.3.2 | 4,583 | 4/27/2018 |
2.3.1 | 3,262 | 4/26/2018 |
2.3.0 | 3,935 | 4/13/2018 |
2.2.0 | 5,758 | 2/25/2018 |
2.1.3 | 3,970 | 11/18/2017 |
2.1.2 | 3,847 | 11/17/2017 |
2.1.1 | 3,902 | 11/17/2017 |
2.1.0 | 3,841 | 11/14/2017 |
2.0.0 | 3,906 | 11/13/2017 |
1.3.0 | 5,020 | 11/10/2017 |
1.2.0 | 5,915 | 10/25/2017 |
1.1.1 | 3,885 | 9/6/2017 |
1.1.0 | 3,831 | 8/25/2017 |
1.0.0 | 4,988 | 8/22/2017 |