Configuring logs

JReport provides a robust, flexible and configurable logging system, which is based on log4j version 1.2.8. JReport also supports versions of log4j version 1.2.8 to 1.3alpha7.

The logging system is used for obtaining meaningful and helpful JReport logging information in a convenient way. It is easy to configure and manage. The following are the significant benefits of the JReport logging system:

Configuring logs

Log configuration tasks can be achieved in three ways. They are:

Logging information using the trace and error type

The JReport logging system enables you to trace both normal and abnormal situations by using the trace and error type. Trace is used for logging something expected or regular, such as tracing a program workflow, logging runtime information and associated elements. Error is used for logging something unexpected or irregular. For example, when a URL is unreachable, a file does not exist, or a table cannot be found in a data source.

Trace type is divided into four levels, and is ordered according to the amount of information logged, from the least to the most. These levels are OFF, OUTLINE, INFO, and TRIVIAL. Similarly, error type is also divided into four levels, and is ordered according to the amount of information logged, from the least to the most. These levels are OFF, FATAL, ERROR, and WARN. For detailed information about the eight levels, see Log panel.

If you want the least amount of information to be logged, you can set trace level to OFF and error level to ERROR. If you want the most amount of information to be logged, you can set trace level to TRIVIAL and error level to WARN. Setting these to the highest level could affect system performance as well as disk usage.

Customizing log file location

You can customize where to output logs in your local disk instead of using the default directory <install_root>\logs.

By default, different log categories are output to different rolling files. For example, the Engine log is output to Engine.log in the <install_root>\logs directory. If you want to customize the location of the Engine log file, take the following steps:

  1. Open the LogConfig.properties file located in the <install_root>\bin directory.
  2. Modify the parameter log4j.appender.EngineRollingFile.File. Set its value to an absolute path with a log file name, for example: C:\logs\Engine.log (on Windows) or /logs/Engine.log (on Linux/Unix).
  3. Save the LogConfig.properties file.
  4. Restart JReport Server.

Configuration settings - effect on performance

The following are configuration properties which have an effect on server performance: