码迷,mamicode.com
首页 > Web开发 > 详细

abp 中log4net 集成Kafka

时间:2019-12-17 13:12:13      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:top   div   install   appname   color   col   bec   config   out   

1.安装包

Install-Package log4net.Kafka.Core

2.修改log4net.config 配置文件

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <appender name="KafkaAppender" type="log4net.Kafka.Core.KafkaAppender, log4net.Kafka.Core">
    <KafkaSettings>
      <broker value="127.0.0.1:9092" />
      <topic value="topic.appname.log" />
    </KafkaSettings>
    <layout type="log4net.Kafka.Core.KafkaLogLayout,log4net.Kafka.Core" >
      <appid value="appid" />
    </layout>
  </appender>
  <root>
    <level value="ALL"/>
    <appender-ref ref="KafkaAppender" />
  </root>
</log4net>

参考资料:https://github.com/beckjin/log4net.Kafka.Core

abp 中log4net 集成Kafka

标签:top   div   install   appname   color   col   bec   config   out   

原文地址:https://www.cnblogs.com/lkd3063601/p/12053755.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!