Skip to content

Welcome to SharpLog

A small logger for big projects.

Installation and usage under Get started.

Full documentation under Reference.

This documentation is up to date with version 3.6.*

Features

  • Fast and easy to use
  • No setup required
  • Easy to customize

Outputs

Outputs are used to display, pass or store your log messages. Sharplog can write to one ore multiple outputs.

Some outputs are already provided out-of-the-box:

  • Print your logs to the standard console including color coding!
  • Print your logs to Spectre.Console.AnsiConsole!

  • Store your logs in a log file without blocking the file!

  • Send your logs via email!

Example

SharpLog.Logging.LogDebug("Debug!");
SharpLog.Logging.LogTrace("Trace!");
SharpLog.Logging.LogInfo("Info!");
SharpLog.Logging.LogWarning("Warning!");
SharpLog.Logging.LogError("Error!");
SharpLog.Logging.LogFatal( //
    "Fatal!", 
    exception: new Exception("Test"), 
    stackTrace: true;