2. 系统配置将错误日志记录到Logstash后端,如下所示:
log4j . appende r . applog.port=50 0 0
log4j . appender . applog. remoteHost=masterlog4j . appender . applog . DatePattern- ' . ' yyyy—MM—ddlog4j . appender . applog .layout=org. apache .1094j . PatternLayoutlog4j . appender . applog .layout . ConversionPattern='od % - 5p [ % t ] %C %M - %m %nlog4j .rootLogger=warn, apploglog4j .logger.nl=debug