Logging configuration
Introduction
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:
- FATAL_ERROR
- ERROR
- WARN
- INFO
- DEBUG
Tweaking the configuration
Configuration in Cocoon is handled by Spring configurator, go there for general information.How to set up a log level
Note: Instructions put below assume that you have created a block
according to this tutorial. Please refer to it, first.
-
create a properties subfolder in your block:
myBlock1/src/main/resources/META-INF/cocoon/properties
- create a new file in that folder that should have as ending .properties, e.g. settings.properties
- inside that file you have to put this line if you want to set log level to
DEBUG:
org.apache.cocoon.log4j.loglevel=debug
myBlock1/target/work/log/log4j.log
Errors and Improvements? If you see any errors or potential improvements in this document please help
us: View, Edit or comment on the latest development version (registration required).


