You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Since version v1.5.3100-beta of the JobScheduler engine it is possible to configure a logging api of your choice to handle the log messages from JobScheduler (assumed the logging api is supported by slf4j). Using this feature you have a wide range of possibilities to handle your logs, e.g. filtering, mailing, eventing etc.

Please look at How_to_configure_JobScheduler_logging for more information.

If you get the lines

 log4j:WARN No appenders could be found for logger (com.sos.scheduler.engine.kernel.plugin.PluginConfiguration).
 log4j:WARN Please initialize the log4j system properly.
 log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

after you've started or stopped the JobScheduler then the JobScheduler logging uses log4j but log4j doesn't found a configuration file.

The JobScheduler release 1.5.3253 is shipped with an active log4j logging because a slf4j-log4j12-x.jar is added to the java class path

 [java]
 class_path = $\{SCHEDULER_HOME\}/lib/*.jar;$\{SCHEDULER_HOME\}/lib/hibernate/*.jar;$\{SCHEDULER_HOME\}/lib/jetty_ext/*.jar;<span style="color:red">$\{SCHEDULER_HOME\}/lib/log/log4j/*.jar</span>

but without a log4j configuration file.

In this case please create a small default log4j configuration file ./lib/log4j.properties with the following content:

 log4j.rootLogger=info, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

and edit the ./config/factory.ini with

 [java]
 class_path = $\{SCHEDULER_HOME\}/lib/*.jar;$\{SCHEDULER_HOME\}/lib/hibernate/*.jar;$\{SCHEDULER_HOME\}/lib/jetty_ext/*.jar;$\{SCHEDULER_HOME\}/lib/log/log4j/*.jar
 <span style="color:red">options    = -Dlog4j.configuration="file:///$\{SCHEDULER_HOME\}/lib/log4j.properties"</span>

so that log4j finds the configuration file.

  • No labels