Error Logging & Debugging in Oracle WebCenter Sites

Adding Dynamic Loggers
To add dynamic loggers, add the following code to log4j.properties file.

Screenshot: log4j.properties file

1

Screenshot: mylogs.log file is created inside the logs folder

errorlog

 

Updating Maximum File size for sites.log file
Screenshot: log4j.properties file

logger4j

 

Backup Files for sites.log file
Screenshot: log4j.properties file

backup

 

Configure log4j
1. Setting up Apache log4j:

If WebCenter Sites was not set up to use log4j during the upgrade process, you can manually switch to log4j by configuring the commons-logging.properties and log4j.properties files in the WEB-INF/classes directory.

To set up log4j:
In the commons-logging.properties file, update the following property to set log4j as WebCenter Sites’ logging system:
org.apache.commons.logging.Log= org.apache.commons.logging.impl.Log4JLogger

2. Viewing Loggers:

Loggers that are registered in the log4j.properties file, in the WEB-INF/classes directory. The file is read only on system start up. If, during runtime, you make changes to the log4j.properties file and save them, your changes will not be displayed in the log4j Configuration form. They will be applied and displayed when WebCenter Sites is restarted.

Note: The futuretense.txt file is typically located in the WebCenter Sites installation directory.

Loggers that are detected during runtime. The loggers are detected when:

  • System features or add-on components are accessed for the first time.
  • The loggers are added to the system manually by developers using the Add Logger.

To view loggers
On the Admin tab, expand System Tools and double-click Configure log4j.
The list of loggers with explicitly assigned levels is displayed.

Screenshot: log4j configuration formviewloggers