Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some jobs of JobScheduler use log4j for logging and it could be necessary to configure these jobs with its own log4j configuration. To do this there are in general different possibilities described below.
Currently it is not allowed to use log4j configuration in xml format.

...

Starting with Release 1.13.3 the JobScheduler Master and Agent, YADE as well as JOC Cockpit uses log4j 2 with xml configuration files.

Configuration by class path

To do this the configuration file has to be placed located in the classpath class path defined in your factory.ini. To enable log4j to find it automatically it has to be stored under the name log4.properties.with the name log4j.properties

Note

Starting with Release 1.13.3 using log4j2 the name of the configuration file has to be log4j2.xml.

Also, the java option was renamed by log4j2 to be log4.configurationFile.

As Beacause some of the libraries uses used by JobScheduler comes come with its their own log4.properties file, it this option is not recommended to select these possibility, because as it is not determined which of the property files is would be selected.

...

Configuration as a global setting

...

To do this, you can place add the following setting in your scheduler.xml (as an attribute of the config element).

Code Block
languagehtml/xml
 <config ... java_options="-Dlog4j.configuration=file:/$\{SCHEDULER_DATA\}/config/my-log4j.properties" />

...

Note
Starting with Release 1.13.3 the java option has to look like this:

-Dlog4j.configurationFile=file://[PATH_TO_YOUR_CONFIGURATION]/log4j2.xml


Configuration as a specific setting for a job

To do this, you can place add the following setting in your job configuration.

Code Block
languagehtml/xml
 <job ... java_options="-Dlog4j.configuration=file:/$\{SCHEDULER_DATA\}/config/my-log4j.properties" />
Note
Starting with Release 1.13.3 the java option has to look like this:

-Dlog4j.configurationFile=file://[PATH_TO_YOUR_CONFIGURATION]/log4j2.xml