| tee /usr/share/elasticsearch/plugins/opendistro-performance-analyzer/pa_config/log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
<RollingFile name="PerformanceAnalyzerLog" fileName="/data/elasticsearch/logs/PerformanceAnalyzer.log" filePattern="/data/elasticsearch/logs
/PerformanceAnalyzer-%i.log.gz" immediateFlush="true" append="true">
<PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [PA:Reader] [%t] %-5level %logger{36} - %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
<RollingFile name="StatsLog" fileName="/data/elasticsearch/logs/performance_analyzer_agent_stats.log" filePattern="/data/elasticsearch/logs
/performance_analyzer_agent_stats-%i.log.gz" immediateFlush="true" append="true">
<PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [PA:Reader] [%t] %-5level %logger{36} - %msg%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
</Appenders>
<Loggers>
<Logger name="stats_log" level="info" additivity="false">
<AppenderRef ref="StatsLog"/>
</Logger>
<Root level="error">
<AppenderRef ref="Console" />
<AppenderRef ref="PerformanceAnalyzerLog"/>
</Root>
</Loggers>
</Configuration>
EOF
Используй темплейты, Люк!
Обсуждают сегодня