Decrease log level

Hello,

I’m using ODFE in docker. And recently upgraded our instance to 1.9.0. And I found that PerformanceAnalyzerPlugin produces a lot of INFO level logs. Is there any way to configure log level for PerformanceAnalyzerPlugin on the fly? Or the only way is to rebuild and reinstall plugin with the new log4j config?

1 Like

I’m doing this by using FATAL as loglevel in log4j2.xml.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="FATAL">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
        </Console>
        <File name="PerformanceAnalyzerLog" fileName="/appl/logs/elasticsearch/nodeName/PerformanceAnalyzer.log" immediateFlush="true" append="true">
            <PatternLayout pattern="%d{yyy-MM-dd HH:mm:ss.SSS} [PA:Reader] [%t] %-5level %logger{36} - %msg%n"/>
        </File>
        <File name="StatsLog" fileName="/appl/logs/elasticsearch/nodeName/performance_analyzer_agent_stats.log" immediateFlush="true" append="true">
        </File>
    </Appenders>
    <Loggers>
        <Logger name="stats_log" level="FATAL" additivity="false">
            <AppenderRef ref="StatsLog"/>
        </Logger>
        <Root level="FATAL">
            <AppenderRef ref="Console" />
            <AppenderRef ref="PerformanceAnalyzerLog"/>
        </Root>
    </Loggers>
</Configuration>

Hello,

I am having the same issue.
@valentin I have edited the log4j2.xml file in /usr/share/elasticsearch/performance-analyzer-rca/pa_config and /usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config
(I am running open distro docker image).
However after restarting the container it does not seems de plugin picks up the new settings.

It still outputs ever metrics to the console

EOE
[2020-08-14T09:22:14,502][INFO ][stats_log                ] [d1fc2515b3d2] ------------------------------------------------------------------------
Program=PerformanceAnalyzerPlugin
rca-version=0.0.1
Metrics=
StartTime=0.000
EndTime=Fri, 14 Aug 2020 09:22:14 UTC
Time=1597396934501 msecs
Timing=total-time:1.597396934501E12/1
Counters=
EOE