Skip to content

BuildSoftwareBetter/Log4cpp-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All 'README' information is now in the HTML documentation,
see doc/html or the project website (http://log4cpp.sf.net/).

添加kafka输出,需通过cmake编译,依赖kafka
linux 下编译:

1. cmake .
2. make
3. sudo make install

linux c++ 使用方式:

1. 修改配置文件

示例:
appender.rootAppender=KafkaAppender
appender.rootAppender.brokers=localhost:9092
appender.rootAppender.topic=log
appender.rootAppender.timeout=0
appender.rootAppender.layout=BasicLayout

appender 设置为 KafkaAppender,需添加brokers、topic、timeout三个参数

2. 编译程序
    依赖rdkafka++
    -lrdkafka -lz -lpthread -lrt

详细查看:https://blog.csdn.net/lwwl12/article/details/89522093

About

log4cpp add kafka output

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors