A new document has been created. http://cocoon.zones.apache.org/daisy/documentation/1399.html
Document ID: 1399 Branch: main Language: default Name: Logging configuration Document Type: Cocoon Document Created: 7/6/07 11:11:18 AM Creator (owner): Grzegorz Kossakowski State: publish Parts ===== Content ------- Mime type: text/xml Size: 1757 bytes Content: <html> <body> <h1>Introduction</h1> <p>Cocoon uses Log4j library for logging and uses it quite extensively so log files can be very valuable source of information how things are performed. There are five standard log levels to choose in order to limit amount of information dumped to log files:</p> <ul> <li>FATAL_ERROR</li> <li>ERROR</li> <li>WARN</li> <li>INFO</li> <li>DEBUG</li> </ul> <p>In production environment it is reasonable to set a log level to <tt>ERROR</tt> or <tt>FATAL_ERROR</tt> so only very important events are logged (like crashes). While developing an application you would probably like to see much more. It's up to you to choose an approporiate log level; little experimantation will give you sense of each setting.</p> <h1>Tweaking the configuration</h1> <p>Configuration in Cocoon is handled by <a href="daisy:1304">Spring configurator</a>, go there for general information.</p> <h2>How to set up a log level</h2> <p class="note">Instructions put below assume that you have created a block according to this <a href="daisy:1159">tutorial</a>. Please refer to it, first. </p> <p>Steps that you need to perform:</p> <ol> <li> <p>create a <tt>properties</tt> subfolder in your block:</p> <pre>myBlock1/src/main/resources/META-INF/cocoon/properties</pre> </li> <li> <p>create a new file in that folder that should have as ending <tt>.properties</tt>, e.g. <tt>settings.properties</tt></p> </li> <li>inside that file you have to put this line if you want to set log level to <tt>DEBUG</tt>:<br/> <pre>org.apache.cocoon.log4j.loglevel=debug</pre> </li> </ol> <p>That's all! Restart your webapp and you should see now a detailed log information in a file in:</p> <pre>myBlock1/target/work/log/log4j.log</pre> </body> </html> Collections =========== The document belongs to the following collections: cdocs-core
