Contents
Serilog (.NET)¶
Logbee integrates with .NET applications using Serilog by registering the
Serilog.Sinks.Logbee
sink.Different use cases and examples can be found on the Serilog integrations page.
using Serilog;
using Serilog.Sinks.LogBee;
Log.Logger = new LoggerConfiguration()
.WriteTo.LogBee(new LogBeeApiKey("_OrganizationId_", "_ApplicationId_", "https://api.logbee.net"))
.CreateLogger();
try
{
Log.Information("Hello from {Name}!", "Serilog");
}
catch(Exception ex)
{
Log.Error(ex, "Unhandled exception");
}
finally
{
Log.CloseAndFlush();
}
For technical support, questions or any feedback, please feel free to send us a message and we will get back to you.