Developer Tools
JDeveloper
Controlling Logging in Struts Based Applications
Written by Duncan Mills, Oracle Corporation
May 2004
Introduction
Applications that are built in JDeveloper 10g using the Struts controller will, by default, automatically log informational messages to the OC4J console. An example of these messages is:
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
27-May-2004 10:10:45 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
27-May-2004 10:10:46 org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='view.ApplicationResources', returnNull=true
The messages provide useful progress information for the developer, however, when deploying the application you may want to suppress the feedback, and of course when debugging the application you may actually need more information from Struts. The Struts controller uses the Apache Commons-Logging framework to handle it's logging and diagnostic needs and this article describes how to configure that logging mechanism.
Configuring Commons-Logging
The basic configuration of logging will involve the creation of two simple properties files in the /WEB-INF/classes directory of your application.
Once these properties files are configured and added to your project, the unwanted log messages will be suppressed
drmills v1.0