Obsolete Pages{{Obsolete}}
The official documentation is at: http://docs.alfresco.com
LoggingDebuggingConfiguration
Back to Server Configuration
This is a brief tutorial on configuring Log4J via the log4j.properties (or log4j.xml) file.
...
<param name='Threshold' value='ERROR'/>
...
</appender>
<root>
<appender-ref ref='FILE'/>
</root>
...
...
<param name='Threshold' value='DEBUG'/>
...
</appender>
<root>
<priority value='ERROR' />
<appender-ref ref='FILE'/>
</root>
...
Using example 1 you can only switch off debugging selectively, which means that you have to actively set a log level for each and every logging category that comes along. This is impractical and leads to costly debug strings being created even though the appenders filter them out. In most cases, the creation of the debug strings is costly and in the worst case contains bugs.
By using example 2 all debugging is disabled, but the appenders will allow debug messages to be output if they have been enabled for a category.
To enable VM summary performance debugging add the following:
...
<category name='performance'>
<priority value='DEBUG'/>
</category>
<category name='performance.summary.method'>
<priority value='ERROR'/>
</category>
...
You can also turn on all class debugging for org.alfresco using:
...
<category name='org.alfresco'>
<priority value='DEBUG'/>
</category>
...
These components use commons-logging.
If you want to see logging from these components, you may need a commons-logging.properties set up to point to log4J.
See also AMP and log4j.properties which contains information on configuring log4j which is relevant even if you aren't packaging an AMP module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.