An appender for Log4j to send logs to Fluentd daemon.
Example for log4j.properties
file :
log4j.rootLogger=ERROR, Console, Fluentd
log4j.appender.Console=...
...
log4j.appender.Fluentd=org.fluentd.logger.sender.appender.FluentAppender
log4j.appender.Fluentd.host=host-with-fluentd
log4j.appender.Fluentd.port=24224
log4j.appender.Fluentd.tag=mytag
log4j.appender.Fluentd.label=mylabel
Host name running Fluentd daemon
- Default : localhost
TCP port to join Fluentd daemon
- Default : 24224
Tag name for Fluentd logs
- Default : log4j-appender
Label associated to logs sent
- Default : label
Example to insert in /etc/td-agent/td-agent.conf
:
<match log4j-appender.label>
type stdout
</match>