Serilog alternatives and similar packages
Based on the "Logging" category.
Alternatively, view Serilog alternatives based on common mentions on social networks and blogs.
-
Logary
Logary is a high performance, multi-target logging, metric, tracing and health-check library for mono and .Net. .Net's answer to DropWizard. Supports many targets, built for micro-services. -
Sentry
.NET SDK for Sentry Open-source error tracking that helps developers monitor and fix crashes in real time.. -
Semantic Logging Application Block (SLAB)
Extends the inbuilt features of System.Diagnostics.Tracing namespace (EventSource class) to log to several sinks including Azure Tables, Databases, files (JSON, XML, text). Supports in-process and out-of-process logging through ETW, and Rx for real-time filtering/aggregating of events. -
Rollbar.NET
Simplifies real-time remote error monitoring while using Rollbar.com. Open-source Rollbar Notifier SDK for any .NET-based technology stack. The SDK that can be used in any application built on the following .NET versions: .NET Core 2.0+, .NET Standard 2.0+, .NET Full Framework 4.5.1+, Mono, Xamarin, and, in general, any implementation of the .NET Standard 2.0+. It simplifies building data payloads based on exception data, tracing data, informational messages, and telemetry data and sends the payloads to the Rollbar API for remote monitoring and analysis of the hosting application's behavior. -
ExcelDna.Diagnostics.Serilog
Integrate Excel-DNA Diagnostic Logging with your Serilog logging pipeling within your Excel-DNA add-in -
Serilog.Sinks.ExcelDnaLogDisplay
A Serilog sink that writes events to Excel-DNA LogDisplay -
NLog.Targets.Pushover
NLog.Targets.Pushover is a custom target for NLog enabling you to send logging messages to the Pushover service -
Essential Diagnostics
Extends the inbuilt features of System.Diagnostics namespace to provide flexible logging -
BugSnag
Logs errors. Includes useful diagnostic info like stack trace, session, release, etc. Has a free tier. [Free for OSS][$]
Get performance insights in less than 4 minutes
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Serilog or a related project?
README
Serilog

Serilog is a diagnostic logging library for .NET applications. It is easy to set up, has a clean API, and runs on all recent .NET platforms. While it's useful even in the simplest applications, Serilog's support for structured logging shines when instrumenting complex, distributed, and asynchronous applications and systems.
Like many other libraries for .NET, Serilog provides diagnostic logging to files, the console, and many other outputs.
var log = new LoggerConfiguration()
.WriteTo.Console()
.WriteTo.File("log.txt")
.CreateLogger();
log.Information("Hello, Serilog!");
Unlike other logging libraries, Serilog is built from the ground up to record structured event data.
var position = new { Latitude = 25, Longitude = 134 };
var elapsedMs = 34;
log.Information("Processed {@Position} in {Elapsed} ms.", position, elapsedMs);
Serilog uses message templates, a simple DSL that extends .NET format strings with named as well as positional parameters. Instead of formatting events immediately into text, Serilog captures the values associated with each named parameter.
The example above records two properties, Position
and Elapsed
, in the log event. The @
operator in front of Position
tells Serilog to serialize the object passed in, rather than convert it using ToString()
. Serilog's deep and rich support for structured event data opens up a huge range of diagnostic possibilities not available when using traditional loggers.
Rendered into JSON format for example, these properties appear alongside the timestamp, level, and message like:
{"Position": {"Latitude": 25, "Longitude": 134}, "Elapsed": 34}
Back-ends that are capable of recording structured event data make log searches and analysis possible without log parsing or regular expressions.
Supporting structured data doesn't mean giving up text: when Serilog writes events to files or the console, the template and properties are rendered into friendly human-readable text just like a traditional logging library would produce:
09:14:22 [INF] Processed {"Latitude": 25, "Longitude": 134} in 34 ms.
Upgrading from Serilog 1.x? Check out the 2.0 Upgrade Guide and Release Notes.
Features
- Community-backed and actively developed
- Format-based logging API with familiar levels like
Debug
,Information
,Warning
,Error
, and so-on - Discoverable C# configuration syntax and optional XML or JSON configuration support
- Efficient when enabled, extremely low overhead when a logging level is switched off
- Best-in-class .NET Core support, including rich integration with ASP.NET Core
- Support for a comprehensive range of sinks, including files, the console, on-premises and cloud-based log servers, databases, and message queues
- Sophisticated enrichment of log events with contextual information, including scoped (
LogContext
) properties, thread and process identifiers, and domain-specific correlation ids such asHttpRequestId
- Zero-shared-state
Logger
objects, with an optional global staticLog
class - Format-agnostic logging pipeline that can emit events in plain text, JSON, in-memory
LogEvent
objects (including Rx pipelines) and other formats
Getting started
Serilog is installed from NuGet. To view log events, one or more sinks need to be installed as well, here we'll use the pretty-printing console sink, and a rolling file set:
Install-Package Serilog
Install-Package Serilog.Sinks.Console
Install-Package Serilog.Sinks.File
The simplest way to set up Serilog is using the static Log
class. A LoggerConfiguration
is used to create and assign the default logger.
using Serilog;
public class Program
{
public static void Main()
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.WriteTo.Console()
.WriteTo.File("log.txt",
rollingInterval: RollingInterval.Day,
rollOnFileSizeLimit: true)
.CreateLogger();
Log.Information("Hello, Serilog!");
Log.CloseAndFlush();
}
}
Find more, including a runnable example application, under the Getting Started topic in the documentation.
Getting help
To learn more about Serilog, check out the documentation - you'll find information there on the most common scenarios. If Serilog isn't working the way you expect, you may find the troubleshooting guide useful.
Serilog has an active and helpful community who are happy to help point you in the right direction or work through any issues you might encounter. You can get in touch via:
- Stack Overflow — this is the best place to start if you have a question
- Gitter chat
- The #serilog tag on Twitter
- Serilog-related courses on Pluralsight
We welcome bug reports and suggestions through our issue tracker here on GitHub.
Contributing
Would you like to help make Serilog even better? We keep a list of issues that are approachable for newcomers under the up-for-grabs label (accessible only when logged into GitHub). Before starting work on a pull request, we suggest commenting on, or raising, an issue on the issue tracker so that we can help and coordinate efforts. For more details check out our [contributing guide](CONTRIBUTING.md).
When contributing please keep in mind our [Code of Conduct](CODE_OF_CONDUCT.md).
Detailed build status
Branch | AppVeyor |
---|---|
dev | |
master |
Serilog is copyright © 2013-2020 Serilog Contributors - Provided under the Apache License, Version 2.0. Needle and thread logo a derivative of work by Kenneth Appiah.
*Note that all licence references and agreements mentioned in the Serilog README section above
are relevant to that project's source code only.