Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

Sherlog

> 编程语言
Open source

Flexible logging for C# and Unity

191 stars0 likes0 views
WebsiteGitHub

About

Flexible logging for C# and Unity

Sherlog – Flexible logging for C# and Unity

Sherlog is a very light logging library with a clear focus on speed, flexibility, and extensibility. It supports local and remote logging out of the box so you can receive log messages from other devices over the air.

Install

NuGet Unity Packages on OpenUPM
Sherlog
Sherlog.Appenders
Sherlog.Formatters

Automated Unity Package Releases: https://github.com/sschmid/com.sschmid.sherlog

Quick Start

The SherlogSamples project contains samples for different use cases, such as logging to the console, adding colors or timestamps, and sending log messages via TCP to other devices.

See SherlogSamples

dotnet run --project samples/SherlogSamples/SherlogSamples.csproj

Run the SherlogServer project to receive the sample log messages from SherlogSamples via a TCP connection.

See SherlogServer

dotnet run --project samples/SherlogServer/SherlogServer.csproj listen 12345

Sherlog terminology

LogLevel

There are 6 log levels matching the Sherlog log methods:

csharp
logger.Trace("This is a message using logger.Trace()");
logger.Debug("This is a message using logger.Debug()");
logger.Info("This is a message using logger.Info()");
logger.Warn("This is a message using logger.Warn()");
logger.Error("This is a message using logger.Error()");
logger.Fatal("This is a message using logger.Fatal()");

You can set the log level per logger or globally for all existing and future loggers.

csharp
Logger.GlobalLogLevel = LogLevel.Warn;
csharp
var logger = Logger.GetLogger("MyLogger");
logger.LogLevel = LogLevel.Debug;

Only log methods that match or exceed the current log level will forward messages to appenders.

Appenders

Sherlog's plugin architecture lets you add multiple different appenders to handle log messages. An appender is a delegate method which contains the logic for processing log messages. It might write a message to a file, print it to the console or send it over the network via TCP. You can easily write your own appenders. There are no limits!

Sherlog comes with a handful of pre-made appenders and helper classes to get you started quickly:

see Sherlog.Appenders

Formatters

Similar to appenders you can add formatters to decorate messages with additional info like logger name, log level, timestamp, or color.

see Sherlog.Formatters

Maintainer(s)

@sschmid on GitHub - @s_schmid on Twitter

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#dotnetloggerloggingtcp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言