Tom
Tom

Reputation: 6342

How to configure to print out Ignite logs

I want to see the INFO level logs that Ignite prints during its running(so that it will help me on what Ignite is doing). I am using the following log4j.properties to make Ignite print INFO level logs,but the logs are not printed out. Are there special configuration to make Ignite logs printed out? Thanks.

log4j.rootCategory=INFO, stdout , R
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%p %d - [TS] %c %M(%L) - %m%n
log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=c:/ioc.ignite.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %d - [TS] %c %M(%L) - %m%n

log4j.logger.org.apache.ignite=INFO
log4j.logger.org.springframework=WARN

Upvotes: 2

Views: 1317

Answers (2)

AdZzZ
AdZzZ

Reputation: 79

Please follow below steps:

e.g. if you are using log4j for logging

  1. configure ignite/config/ignite-log4j.xml in gridLogger of IgniteConfiguration

    e.g.

    .........

  2. uncomment "CONSOLE" appender in ignite/config/ignite-log4j.xml

  3. copy ignite/libs/optional/ignite-log4j/log4j.jar and ignite/libs/optional/ignite-log4j/ignite-log4j.jar in ignite/libs/ folder
  4. you can also set IGNITE_LOG_HOME environment variable to redirect the logs to any file

Upvotes: 1

a_gura
a_gura

Reputation: 410

You should use <CLASSPATH>/config/ignite-log4j.xml file instead of log4j.properties.

Upvotes: 0

Related Questions