serilog - Simple .NET logging with fully-structured events

  •        95

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.

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.



Related Projects

serilog-aspnetcore - Serilog integration for ASP.NET Core 2+

Serilog logging for ASP.NET Core. This package routes ASP.NET Core log messages through Serilog, so you can get information about ASP.NET's internal operations logged to the same Serilog sinks as your application events.First, install the Serilog.AspNetCore NuGet package into your app. You will need a way to view the log messages - Serilog.Sinks.Console writes these to the console; there are many more sinks available on NuGet.

serilog-sinks-elasticsearch - A Serilog sink that writes events to Elasticsearch

The Serilog Elasticsearch sink project is a sink (basically a writer) for the Serilog logging framework. Structured log events are written to sinks and each sink is responsible for writing it to its own backend, database, store etc. This sink delivers the data to Elasticsearch, a NoSQL search engine. It does this in a similar structure as Logstash and makes it easy to use Kibana for visualizing your logs.Register the sink in code or using the appSettings reader (from v2.0.42+) as shown below.

serilog-extensions-logging - Serilog provider for Microsoft.Extensions.Logging

A Serilog provider for Microsoft.Extensions.Logging, the logging subsystem used by ASP.NET Core.ASP.NET Core 2.0 applications should prefer Serilog.AspNetCore and UseSerilog() instead.

serilog-extensions-logging-file - Add file logging to ASP.NET Core apps in one line of code.

This package makes it a one-liner - loggerFactory.AddFile() - to configure top-quality file logging for ASP.NET Core apps.You can get started quickly with this package, and later migrate to the full Serilog API if you need more sophisticated log file configuration.

serilog-sinks-async - An asynchronous wrapper for Serilog sinks that logs on a background thread

An asynchronous wrapper for other Serilog sinks. Use this sink to reduce the overhead of logging calls by delegating work to a background thread. This is especially suited to non-batching sinks like the File and RollingFile sinks that may be affected by I/O bottlenecks.Note: many of the network-based sinks (CouchDB, Elasticsearch, MongoDB, Seq, Splunk...) already perform asychronous batching natively and do not benefit from this wrapper.

serilog-sinks-seq - A Serilog sink that writes events to the Seq structured log server

A Serilog sink that writes events to the Seq structured log server. Supports .NET 4.5+, .NET Core, and platforms compatible with the .NET Platform Standard 1.1 including Windows 8 & UWP, Windows Phone and Xamarin.The sink can take advantage of Seq's API keys to authenticate clients and dynamically attach properties to events at the server-side. To use an API key, specify it in the apiKey parameter of WriteTo.Seq().

serilog-sinks-splunk - A Serilog sink that writes to Splunk

A Serilog sink that writes events to the Splunk. Supports .NET 4.5+, .NET Core, and platforms compatible with the .NET Platform Standard 1.1 including Windows 8 & UWP, Windows Phone and Xamarin.More information is available on the wiki.

serilog-sinks-xamarin - A Serilog sink that writes events to Xamarin mobile targets

Writes Serilog events to the console of Xamarin.iOS (NSLog) / Xamarin.Android (AndroidLog).Because the memory buffer may contain events that have not yet been written to the target sink, it is important to call Log.CloseAndFlush() or Logger.Dispose() when the application/activity exits.

serilog - The best of traditional and structured logging for .NET

The best of traditional and structured logging for .NET

serilog-settings-configuration - A Serilog configuration provider that reads from Microsoft

A Serilog settings provider that reads from Microsoft.Extensions.Configuration, .NET Core's appsettings.json file.Configuration is read from the Serilog section.

serilog-sinks-console - Write log events to System.Console as text or JSON, with ANSI theme support

A Serilog sink that writes log events to the Windows Console or an ANSI terminal via standard output. Coloring and custom themes are supported, including ANSI 256-color themes on macOS, Linux and Windows 10. The default output is plain text; JSON formatting can be plugged in using a package such as Serilog.Formatting.Compact.Adding a new theme is straightforward; examples can be found in the SystemConsoleThemes and AnsiConsoleThemes classes.

serilog-sinks-literate - A console sink for Serilog that pretty-prints embedded properties

An alternative colored console sink for Serilog that uses a literate programming-inspired presentation to showcase the structure/type of event data. This is in contrast with the ColoredConsole sink that uses color predominantly to emphasise an event's level.The features of this sink have now been merged into the default Serilog console sink. We recommend using the console sink instead.

serilog-sinks-periodicbatching - A base class for Serilog sinks that process events in batches.

A base for Serilog sinks that batch and asynchronously send events to a slow/remote target.Copyright © 2016 Serilog Contributors - Provided under the Apache License, Version 2.0.

tinylog - tinylog is a lightweight logging framework for Java and Android.

tinylog is a lightweight open-source logging framework for Java and Android, optimized for ease of use. The logger of tinylog is static, so it isn't necessary to create an instance of the logger before logging. By default all log entries of the level info or higher are written to the console.

Logrus - Structured, pluggable logging for Go.

Logrus is a structured logger for Go (golang), completely API compatible with the standard library logger. There is a support to add hooks for logging levels. For example to send errors to an exception tracking service on Error, Fatal and Panic, info to StatsD or log to multiple places simultaneously, e.g. syslog.

serilog-docker - An example docker image for testing Serilog

A docker image for testing Serilog on *nix platforms. Also some sample apps.

serilog-enrichers-environment - Enrich Serilog log events with properties from System.Environment.

Enriches Serilog events with information from the process environment.The WithMachineName() enricher will add a MachineName property to produced events.

serilog-formatting-compact - Compact JSON event format for Serilog

A simple, compact JSON-based event format for Serilog. CompactJsonFormatter significantly reduces the byte count of small log events when compared with Serilog's default JsonFormatter, while remaining human-readable. It achieves this through shorter built-in property names, a leaner format, and by excluding redundant information.A simple Hello, {User} event.

serilog-sinks-amazonkinesis - A Serilog sink that logs to Amazon Kinesis

A Serilog sink that writes events as documents to Amazon Kinesis.

serilog-sinks-applicationinsights - A Serilog sink that writes events to Microsoft Azure Application Insights

A sink for Serilog that writes events to Microsoft Application Insights.For those two LogEvent instances that have Exceptions are always sent as Exceptions to AI though... well, by default.