Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Serilog.Sinks.RollbarCom

Build status Quality Gate NuGet

A Serilog sink which writes events to Rollbar.

Installation

The library is available as a Nuget package.

Install-Package Serilog.Sinks.RollbarCom

Get started

var log = new LoggerConfiguration()
    .WriteTo.Rollbar("Post server access token")
    .Enrich.FromLogContext()
    .CreateLogger();

// By default, only messages with level errors and higher are captured
log.Error("This error goes to Rollbar.");

Providing additional info

Person info

Rollbar docs person tracking

.WriteTo.Rollbar("Post server access token", transform: payload => {
    payload.Data.Person = new Person() {
        Id = myId,
        UserName = myUsername
    };
})

Code version

Rollbar docs versions

.WriteTo.Rollbar("Post server access token", transform: payload => {
    payload.Data.CodeVersion = myVersion;
})