Skip to content

TCGplayer/Serilog.Sinks.Scalyr

 
 

Repository files navigation

Serilog.Sinks.Scalyr

NuGet Version

Writes Serilog events to Scalyr. This sink uses the addEvents API to insert structured log events.

Getting started

Install the Serilog.Sinks.Scalyr package from NuGet:

Install-Package Serilog.Sinks.Scalyr

To configure the sink in C# code, call WriteTo.Scalyr() during logger configuration:

var log = new LoggerConfiguration()
    .WriteTo.Scalyr("token", "logfile")
    .CreateLogger();

token "Write Logs" API token. Find API tokens at https://www.scalyr.com/keys.

logfile The name of the log file being written to. This will probably be the name of your app.

Optional parameters

batchSizeLimit The maximum number of events to include in a single batch.

period The time to wait between checking for event batches.

queueLimit Maximum number of events in the queue.

sessionInfo Additional information about the session. See https://www.scalyr.com/help/api.

scalyrUri The base URI for Scalyr. Defaults to https://scalyr.com.

outputTemplate A message template describing the output messages. See https://github.com/serilog/serilog/wiki/Formatting-Output.

restrictedToMinimumLevel The minimum log event level required in order to write an event to the sink.

About

Serilog sink that writes to Scalyr

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 59.9%
  • F# 37.8%
  • Shell 2.3%