Skip to content

3.10 Log4J Configuration

Pascal Hürlimann edited this page Mar 12, 2020 · 2 revisions

The default configuration provided by IBM provides basic logging functionality to the console while debugging. While this can be helpful, it can often be important to have more intricate logging available during development. Since Version 2.3, the jazz development environment comes with a log4j template which provides sane default logging settings. Logs are written to the jde/logs directory. The pre-configured default is that both file and console log the WARN level and above. However, changing the default behavior is simple.

Example

A routine change to the default settings is logging DEBUG messages to file, so that it can be inspected during development. Using the jazz development environment default log4j settings, doing so is very easy. Line 2 of the jde/user/log4j/log4j.properties file has to be changed from log4j.rootLogger=WARN, stdout, file to log4j.rootLogger=DEBUG, stdout, file. Log files are rotated, but will eat up a lot of space in this setting, which is why this is not the default.

Documentation

For detailed documentation of log4j, please refer to the log4j manual. RTC supports the entirety of log4j, meaning that jde/user/log4j/log4j.properties can be completely customized.