Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Integrations

SeriLog for .Net Core SeriLog for .Net Core

Last Updated: Mar. 30, 2022

If you are using SeriLog as your logger in .Net Core, you can use Coralogix Sink to push logs to your Coralogix Account.

The first thing you need to do is fetch SeriLog.Sinks.Coralogix from NuGet


Coralogix Sinks needs to be configured with your PrivateKey ApplicationName and SubSystemName.

Here is an example:

using Serilog.Sinks.Coralogix;
using Serilog;

var log = new LoggerConfiguration()
                .WriteTo.CoralogixSink(new CoralogixSinkOptions
                    PrivateKey = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
                    ApplicationName = "myApp",
                    SubsystemName = "mySubs"

If your Coralogix account domain ends up in .us or .in you need to set up your endpoint URL accordingly.

For .us:

set env-var CORALOGIX_LOG_URL="https://api.coralogix.us:443/api/v1/logs"

For .in:

set env-var CORALOGIX_LOG_URL="https://api.app.coralogix.in:443/api/v1/logs"

On this page