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.
Configuration by class path
To do this the configuration file has to be located in the class path defined in your factory.ini. To enable log4j to find it automatically it has to be stored with the name log4.properties.
As some of the libraries used by JobScheduler come with their own log4.properties file, this option is not recommended as it is not determined which of the property files would be selected.
Configuration as a global setting
To do this, you can add the following setting in your scheduler.xml (as an attribute of the config element).
<config ... java_options="-Dlog4j.configuration=file:/${SCHEDULER_DATA}/config/my-log4j.properties" />
Configuration as a specific setting for a job
To do this, you can add the following setting in your job configuration.
<job ... java_options="-Dlog4j.configuration=file:/${SCHEDULER_DATA}/config/my-log4j.properties" />