Versions Compared

Key

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

...

This uses the established (if awkward) method of having a name.count followed by name.1, name.2 etc. to form an array of strings for the value "name". In this case, the name is "log.config". The values are of the form LEVEL.logger, and the possible levels are: OFF TRACE DEBUG INFO WARN ERROR FATAL ALL.

Changing the Log Configuration

Sakai uses log4j for logging. See the official log4j documentation for more information about how to configure it if you have questions, but a few notes are collected here below.

(warning) When the Sakai common services were repackaged, the base log4j.properties file was relocated to the kernel. Currently, changing log settings requires checking out the latest kernel tag or maintenance branch and patching it locally. This is not ideal and will be addressed in Sakai 2.6.1 to permit easier overriding of default log4j settings.

To change the logging for Sakai in the source you can use sakai-srcmodify kernel/kernel/log-configurecommon/src/confmain/config/log4j.properties, and the relevant following property is:

No Format
log4j.logger.org.sakaiproject=INFO

To turn on debug logging for all of Sakai, change that the value from INFO to DEBUG. In order to turn on enable debug logging for just a single component of Sakai components, add a line such as in the following example, which will leave most of Sakai at INFO, but generate DEBUG level messages for the SQL service:

...

The logging controls are part of the LogConfigurationManager, implemented as a component in the util moduleKernel. It can be disabled, if that's desired, with an entry in sakai.properties:

...