ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Scherbakov <alexey.scherbak...@gmail.com>
Subject Re: How to re-direct Ignite logs to log4j2?
Date Sun, 17 Apr 2016 12:33:56 GMT
Hi,


For embedded mode you can try something like this:

IgniteConfiguration cfg = new IgniteConfiguration();
...
cfg.setGridLogger(new Log4J2Logger(U.resolveIgniteUrl("log4j2.xml",
false)));
Ignition.start(cfg);

The key point here is to tell Ignite to use Log4J2 implementation for
logging.
Make sure you have log4j2.xml on your classpath.


2016-04-16 15:40 GMT+03:00 Kamal C <kamaltarget@gmail.com>:

> Hi
>
>     I'm not able to re-direct the Ignite logs to log4j2. I tried it by
> adding the optional `ignite-log4j2` directory to the class path and added
> the log4j2.xml. Still, the logs thrown to the console.
>
> Can anyone tell how to re-direct the logs?
>
> --Kamal
>



-- 

Best regards,
Alexei Scherbakov

Mime
View raw message