You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2006/10/06 11:57:21 UTC

[DAISY] Created: Logging

A new document has been created.

http://cocoon.zones.apache.org/daisy/documentation/1257.html

Document ID: 1257
Branch: main
Language: default
Name: Logging
Document Type: Cocoon Document
Created: 10/6/06 9:57:18 AM
Creator (owner): Reinhard Pötz
State: publish

Parts
=====

Content
-------
Mime type: text/xml
Size: 2007 bytes
Content:
<html>
<body>

<h1>Logging</h1>

<p>Cocoon uses <a href="http://logging.apache.org/log4j">Log4J</a> by default
and all log statements are written to a single log file in the temporary
directory of the application server. The configuration for log4j is in the
WEB-INF directory in the log4j.xconf file. The logging can be controlled in
various ways as described below.</p>

<h2>Location of the logging configuration</h2>

<p>By default, Cocoon loads <em>WEB-INF/log4j.xconf</em> as the configuration
for Log4J. If you want to make any changes to the configuration file, it is
advisable to not alter this default file but instead use your own configuration.
By setting the <em>org.apache.cocoon.logging.configuration</em> property in your
properties, you can point to a different configuration file.</p>

<h2>Bootstrap log level</h2>

<p>TBD</p>

<h2>Environment Logging Category</h2>

<p>TBD</p>

<h2>Cocoon Logging Category</h2>

<p>TBD</p>

<h2>Overriding the log level</h2>

<p>For development you can override the configured log level from your Log4J
configuration by setting the property
<em>org.apache.cocoon.override.loglevel</em> with the name of the level. This is
for example very usefull to set the log level to debug for development purposes
without changing the logging configuration.</p>

<h2>Shielded Classloading</h2>

<p>By default, Cocoon is configured to use shielded classloading. Therefore an
own instance of Log4J is instantiated for just the Cocoon web application. If
you want to share a global Log4J configuration between web applications, you
have to turn off the shielded classloading for the whole Cocoon instance of for
just Log4J.</p>

<h2>Using your own logging system</h2>

<p>If you want to use your own logging system instead of Log4J you can setup a
Logger bean in the root application context of Spring. This bean must be
registered with the name <em>org.apache.avalon.framework.logger.Logger</em> and
it must conform to the interface with this name.</p>

</body>
</html>

Collections
===========
The document belongs to the following collections: documentation, cdocs-core