I am hoping to use a separate appender for Ignite logs in my application. In my 
configuration file, I have:

<asyncLogger name="org.apache.ignite" level="info" additivity="false">
     <appender-ref ref="IGNITE"/>
</asyncLogger>
<asyncRoot level="info">
     <appender-ref ref="MAIN"/>
     <appender-ref ref="ActLogAppender" level="ERROR"/>
 </asyncRoot>

IGNITE and MAIN are both RollingRandomAccessFile appenders pointing to 
different files. In my java code I have:

File logConfigFile = new File(config.getIgniteGridLoggerXmlPath());
try {
    IgniteLogger logger = new Log4J2Logger(logConfigFile);
    ignCfg.setGridLogger(logger);
} catch (IgniteCheckedException e) {
    LOG.error("Unable to set up IgniteLogger with path {}", logConfigFile, e);
}

When I run my application, Ignite is still sending all of its logs to the same 
file that MAIN points to. Any idea why this doesn't work? Should the name for 
the logger be something different than "org.apache.ignite"?

Reply via email to