keisenb.serilog.kafka.sink 0.0.8

Serilog Kafka Sink

A Kafka Sink for producing structured logging events from Serilog to a topic.

Install-Package keisenb.serilog.kafka.sink -Version 0.0.8
dotnet add package keisenb.serilog.kafka.sink --version 0.0.8
<PackageReference Include="keisenb.serilog.kafka.sink" Version="0.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add keisenb.serilog.kafka.sink --version 0.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

serilog-kafka-sink

A Serilog sink for sending structured logging events to Apache Kafka

Add this to your global.asax.cs file

string brokers = "kafka-server:9092,kafka-server2:9092"; //comma seperated list of kafka brokers
string topic = "kafka-topic-name"; //name of kafka topic to produce logs to
string application = "bills-app-service"; //name of service that is producing log messages

Log.Logger = new LoggerConfiguration()
    .WriteTo
    .Kafka(batchSizeLimit: 50, period: 1, brokers: brokers, topic: topic, application: application)
    .CreateLogger();

serilog-kafka-sink

A Serilog sink for sending structured logging events to Apache Kafka

Add this to your global.asax.cs file

string brokers = "kafka-server:9092,kafka-server2:9092"; //comma seperated list of kafka brokers
string topic = "kafka-topic-name"; //name of kafka topic to produce logs to
string application = "bills-app-service"; //name of service that is producing log messages

Log.Logger = new LoggerConfiguration()
    .WriteTo
    .Kafka(batchSizeLimit: 50, period: 1, brokers: brokers, topic: topic, application: application)
    .CreateLogger();

Release Notes

Code cleanup, removed schema, added application variable, updated documentation.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.0.8 125 2/14/2019
0.0.4 412 12/27/2017