Susanta
Susanta

Reputation: 319

Log4j from third-party code in Ignite node: no configuration file found

I supply the configuration file (via -Dlog4j.configurationFile) from my master node (which is run programmatically). The master node distributes a batch job (10 similar tasks). The task involves thrid-party code that uses the following line of log4j:

final org.apache.logging.log4j.Logger lgr = LogManager.getLogger(Command.class).

The master node has no problem and works fine but the other nodes (started via bin/ignite.bat) shows the folowing:

ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

Upvotes: 2

Views: 320

Answers (1)

dmagda
dmagda

Reputation: 1795

Set Log4j logger on the other nodes, that are started with ignite.bat, by adding the following to the configuration of the nodes

          <property name="gridLogger">
              <bean class="org.apache.ignite.logger.log4j.Log4JLogger">
                  <constructor-arg type="java.lang.String" value="config/ignite-log4j.xml"/>
              </bean>
          </property>

Also make sure that "config/ignite-log4j.xml" is located in your Apache distribution. Finally don't forget to move "ignite-log4j" lib from "libs/optional" folder to "libs" folder.

Upvotes: 2

Related Questions