Apache log4j is used as the logging system in new WebCenter Sites 11gR1 installations.
Note:
While Apache log4j is supported in the process of upgrading to WebCenter Sites 11gR1, installation engineers have the option to continue using Jakarta Commons Logging if the source system (FatWire Content Server 7.6 patch 1 or patch 2) was set to use Jakarta Commons Logging. Once a system is upgraded, switching to Apache log4j becomes a manual process, as described in "Setting Up Apache log4j" in the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
When Apache log4j is set up, two files are configured:
The commons-logging.properties
file, in which the property org.apache.commons.logging.Log
is set to specify the Log4JLogger (its value is the class name com.fatwire.cs.core.logging.Log4JLogger
).
The log4j.properties
file is created to specify how information must be logged and which type of information will be logged. The log4j.properties
file contains the following entries:
A set of appenders named FWDefaultAppender
, which specify how information must be logged. For example, the property FWDefaultAppender.File
specifies the WebCenter Sites log file and its location. The list of properties is available in "Configure log4j" in the Oracle Fusion Middleware WebCenter Sites Administrator's Guide. For descriptions of these and other log4j-specific properties, see the Apache log4j documentation.
WebCenter Sites loggers, which determine the type of information that will be logged and at which severity level. The loggers are copied from the commons-logging.properties
file (see Chapter 5, "commons-logging.properties") to the log4j.properties
file and their names are prefaced with log4j.logger
.
For example, in the commons-logging.properties
file, the following logger is used to specify the log severity for messages related to database access, queries, and statement execution:
logger.com.fatwire.logging.cs.db
When copied to the log4j.properties
file, the logger is named as follows:
log4j.logger.com.fatwire.logging.cs.db
For descriptions of WebCenter Sites loggers, see Chapter 5, "commons-logging.properties."
When log4j is set up, the WebCenter Sites Admin interface displays the Configure log4j tool in the System Tools node, on the Admin tab. The Configure log4j tool enables general administrators to view current loggers, temporarily change logger levels, and add new loggers directly from the administrator's interface. Changes made from the Admin interface remain in effect only until WebCenter Sites is restarted. They will persist upon restart only if the text version of the logger properties is copied from the interface to the log4j.properties
file. (Changes that are made directly in the log4j.properties
file will not be applied to WebCenter Sites until the system is restarted.) For more information about the Configure log4j tool, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.