![]() |
VOOZH | about |
dotnet add package SyslogLogging --version 2.1.0
NuGet\Install-Package SyslogLogging -Version 2.1.0
<PackageReference Include="SyslogLogging" Version="2.1.0" />
<PackageVersion Include="SyslogLogging" Version="2.1.0" />Directory.Packages.props
<PackageReference Include="SyslogLogging" />Project file
paket add SyslogLogging --version 2.1.0
#r "nuget: SyslogLogging, 2.1.0"
#:package SyslogLogging@2.1.0
#addin nuget:?package=SyslogLogging&version=2.1.0Install as a Cake Addin
#tool nuget:?package=SyslogLogging&version=2.1.0Install as a Cake Tool
<img src="assets/logo.png" alt="SyslogLogging Logo" width="128" height="128" />
👁 NuGet Version
👁 NuGet Downloads
SyslogLogging is a C# logging library for syslog, console, and file destinations. It supports synchronous and asynchronous logging, structured log entries, Microsoft.Extensions.Logging integration, and file retention management.
Current release: 2.1.0
Target builds:
.NET Standard 2.0.NET Standard 2.1.NET Framework 4.6.2.NET Framework 4.8.NET 8.0.NET 10.0LogEntryMicrosoft.Extensions.Logging provider and DI registration{app}, {pid}, {source}, and {correlation}LoggingSettings.ApplicationName so callers can explicitly control the {app} header token without changing the existing logging API.{app} fallback resolution to use Assembly.GetEntryAssembly()?.GetName().Name before falling back to the current process name..Exception() and .ExceptionAsync() so they honor LoggingSettings.ExceptionSeverity.net8.0 and net10.0.dotnet add package SyslogLogging
using SyslogLogging;
LoggingModule log = new LoggingModule();
await log.InfoAsync("Hello, world!");
using SyslogLogging;
LoggingModule log = new LoggingModule("mysyslogserver", 514);
await log.WarnAsync("Rate limit exceeded");
using SyslogLogging;
LoggingModule log = new LoggingModule("./logs/app.log", FileLoggingMode.SingleLogFile);
await log.InfoAsync("File-only message");
LogEntry entry = new LogEntry(Severity.Error, "Payment processing failed")
.WithProperty("OrderId", orderId)
.WithProperty("Amount", amount)
.WithProperty("Currency", "USD")
.WithCorrelationId(correlationId)
.WithSource("PaymentService")
.WithException(exception);
await log.LogEntryAsync(entry);
await log.BeginStructuredLog(Severity.Info, "User login")
.WithProperty("UserId", userId)
.WithProperty("IpAddress", ipAddress)
.WithCorrelationId(correlationId)
.WriteAsync();
services.AddLogging(builder =>
{
builder.AddSyslog("syslogserver", 514);
});
Multiple syslog targets are also supported:
services.AddLogging(builder =>
{
builder.AddSyslog(new List<SyslogServer>
{
new SyslogServer("primary-log", 514),
new SyslogServer("backup-log", 514)
}, enableConsole: true);
});
log.Settings.HeaderFormat = "{ts} {host}[{pid}] {sev} [T:{thread}] [{app}]";
log.Settings.ApplicationName = "MyService";
log.Settings.TimestampFormat = "yyyy-MM-dd HH:mm:ss.fff";
log.Settings.UseUtcTime = true;
Available header variables:
| Variable | Description | Example |
|---|---|---|
{ts} |
Timestamp | 2024-01-15 14:30:25.123 |
{host} |
Machine name | web-server-01 |
{thread} |
Thread ID | 12 |
{sev} |
Severity name | Info |
{level} |
Severity number | 6 |
{pid} |
Process ID | 1234 |
{user} |
Current username | john.doe |
{app} |
Application name | MyWebApp |
{domain} |
App domain | MyWebApp.exe |
{cpu} |
CPU core count | 8 |
{mem} |
Memory usage in MB | 256 |
{uptime} |
Process uptime | 02:45:30 |
{correlation} |
Correlation ID | abc-123-def |
{source} |
Log source | UserService |
{app} resolves in this order:
log.Settings.ApplicationNameAssembly.GetEntryAssembly()?.GetName().NameLoggingModule log = new LoggingModule("./logs/app.log", FileLoggingMode.FileWithDate, true);
LoggingSettings settings = log.Settings;
settings.LogRetentionDays = 30;
log.Settings = settings;
Retention cleanup only applies when using FileLoggingMode.FileWithDate. The cleanup timer removes files matching the dated filename pattern when they are older than the configured retention period.
Run the shared Touchstone suite through the CLI runner:
dotnet run --project src/Test.Automated/Test.Automated.csproj -f net10.0
dotnet run --project src/Test.Automated/Test.Automated.csproj -f net8.0
Run the same shared descriptors through xUnit and NUnit:
dotnet test src/Test.Xunit/Test.Xunit.csproj
dotnet test src/Test.Nunit/Test.Nunit.csproj
The shared suite covers:
Microsoft.Extensions.Logging integrationThe repository also includes SyslogServer, a simple utility application for receiving syslog traffic during development and testing.
See for release details.
File issues or feature requests at:
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 is compatible. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on SyslogLogging:
| Package | Downloads |
|---|---|
|
Omnicx.WebStore.Core
OmniCX WebStore Core contains the Controllers, API SDK and Models required to run the MVC Views of the WebStore. |
|
|
BigQ.dll
BigQ is a messaging platform using TCP sockets and websockets featuring sync, async, channel, and private communications. |
|
|
ContainerFS
Self-contained single-user file system written in C#. |
|
|
Less3
<3 Less3 is S3-compatible object storage that you can run on your laptop, server, or anywhere you like. |
|
|
LiteGraph
LiteGraph is a property graph database with support for graph relationships, tags, labels, metadata, data, and vectors. |
Showing the top 2 popular GitHub repositories that depend on SyslogLogging:
| Repository | Stars |
|---|---|
|
litegraphdb/litegraph
Lightweight graph database with relational, vector, and MCP support, designed to power knowledge and artificial intelligence persistence and retrieval.
|
|
|
jchristn/Less3
Less3 is an S3-compatible object storage server that runs on your laptop, servers, just about anywhere!
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.0 | 240 | 5/4/2026 |
| 2.0.13 | 2,498 | 12/28/2025 |
| 2.0.12 | 486 | 12/24/2025 |
| 2.0.11 | 6,084 | 10/7/2025 |
| 2.0.10 | 603 | 9/22/2025 |
| 2.0.9 | 248 | 9/22/2025 |
| 2.0.8 | 10,725 | 1/7/2025 |
| 2.0.7 | 5,522 | 12/23/2024 |
| 2.0.6 | 893 | 10/17/2024 |
| 2.0.5 | 647 | 9/10/2024 |
| 2.0.4 | 280 | 9/10/2024 |
| 2.0.3 | 284 | 9/10/2024 |
| 2.0.2 | 17,294 | 8/1/2023 |
| 2.0.1.8 | 10,349 | 10/6/2022 |
| 2.0.1.7 | 22,056 | 11/19/2021 |
| 2.0.1.6 | 1,617 | 11/12/2021 |
| 2.0.1.5 | 4,503 | 9/13/2021 |
| 2.0.1.4 | 25,476 | 5/20/2021 |
| 2.0.1.3 | 4,737 | 3/11/2021 |
| 2.0.1.2 | 1,354 | 3/11/2021 |
Added ApplicationName override, fixed ExceptionSeverity handling, improved concurrent async file logging, and migrated tests to Touchstone