Confluent.Kafka.log4net
1.0.2
See the version list below for details.
dotnet add package Confluent.Kafka.log4net --version 1.0.2
NuGet\Install-Package Confluent.Kafka.log4net -Version 1.0.2
<PackageReference Include="Confluent.Kafka.log4net" Version="1.0.2" />
paket add Confluent.Kafka.log4net --version 1.0.2
#r "nuget: Confluent.Kafka.log4net, 1.0.2"
// Install Confluent.Kafka.log4net as a Cake Addin #addin nuget:?package=Confluent.Kafka.log4net&version=1.0.2 // Install Confluent.Kafka.log4net as a Cake Tool #tool nuget:?package=Confluent.Kafka.log4net&version=1.0.2
Confluent.Kafka.log4net
========== Confluent.Kafka.log4net provide kafka appender, also provide logstash json_event PatternLayout.
Getting Started
Step 1: Install Confluent.Kafka.log4net package
Install-Package Confluent.Kafka.log4net
Step 2: Configure log4net sections
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="KafkaAppender" type="Confluent.Kafka.log4net.KafkaAppender, Confluent.Kafka.log4net">
<KafkaSettings>
<brokers>
<add value="http://kafka:9092" />
</brokers>
<topic type="log4net.Layout.PatternLayout">
<conversionPattern value="kafka.logstash.DEBUG" />
</topic>
</KafkaSettings>
<layout type="Confluent.Kafka.log4net.LogstashLayout,Confluent.Kafka.log4net" >
<app value="erp.logs" />
</layout>
</appender>
<appender name="BufferingKafkaAppender" type="Confluent.Kafka.log4net.BufferingKafkaAppender, Confluent.Kafka.log4net">
<KafkaSettings>
<brokers>
<add value="http://kafka:9092" />
</brokers>
<topic type="log4net.Layout.PatternLayout">
<conversionPattern value="kafka.logstash.DEBUG" />
</topic>
</KafkaSettings>
<layout type="Confluent.Kafka.log4net.LogstashLayout,Confluent.Kafka.log4net" >
<app value="erp.logs" />
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="KafkaAppender" />
</root>
</log4net>
How to use Confluent.Kafka.log4net without logstash?
Using layout log4net.Layout.PatternLayout
to instead Confluent.Kafka.log4net.LogstashLayout
.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.6 is compatible. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- Confluent.Kafka (>= 0.11.3)
- log4net (>= 2.0.8)
- Newtonsoft.Json (>= 10.0.3)
-
.NETFramework 4.6
- Confluent.Kafka (>= 0.11.3)
- log4net (>= 2.0.8)
- Newtonsoft.Json (>= 10.0.3)
-
.NETStandard 1.6
- Confluent.Kafka (>= 0.11.3)
- log4net (>= 2.0.8)
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 10.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.0.0
增加了KafkaAppender来写入kafka日志系统
add KafkaAppender class to write log to kafka system.
增加了一些Debug信息在控制台中输出以便排查kafka的问题
add some debug info to the console ,as to analyze kafka issue.
v1.0.1
增加了BufferKafkaAppender来批量写入kafka日志系统
add BufferKafkaAppender class to batch write log to kafka system.
v1.0.2
修复发送消息双倍的问题
fix the duplicated message send to kafka bug