【发布时间】:2015-06-30 10:10:56
【问题描述】:
我正在使用 Apache Flume 进行日志收集。这是我的配置文件
httpagent.sources = http-source
httpagent.sinks = local-file-sink
httpagent.channels = ch3
#Define source properties
httpagent.sources.http-source.type = org.apache.flume.source.http.HTTPSource
httpagent.sources.http-source.channels = ch3
httpagent.sources.http-source.port = 8082
# Local File Sink
httpagent.sinks.local-file-sink.type = file_roll
httpagent.sinks.local-file-sink.channel = ch3
httpagent.sinks.local-file-sink.sink.directory = /home/avinash/log_dir
httpagent.sinks.local-file-sink.sink.rollInterval = 21600
# Channels
httpagent.channels.ch3.type = memory
httpagent.channels.ch3.capacity = 1000
我的应用程序运行良好。我的问题是在 log_dir 中文件默认使用一些随机数(我猜它的时间戳)时间戳。
如何为日志文件提供正确的文件名后缀?
【问题讨论】:
-
您能否提供生成的示例日志文件名以及 conf/log4j.properties 文件的内容?
标签: apache logging flume flume-ng flume-twitter