cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Schumacher <>
Subject Re: Logging in cocoon
Date Sat, 01 May 2004 20:49:11 GMT
Sorry, was too blind to see how simple the ingenius avalon/cocoon people 
had made logging.

For all those who likes "hello world" to start with:

import org.apache.log.Hierarchy;
import org.apache.log.Logger;
    private Logger logger;
            logger = Hierarchy.getDefaultHierarchy().getLoggerFor("myLog");
   "hello world" );

With additions to logkit.xconf:

in targets:
<cocoon id="myLog">
  <format type="cocoon">         %7.7{priority} %{time} %{category}: 

in catagories:
<category log-level="INFO" name="myLog">
  <log-target id-ref="myLog"/>

The result appears in myLog.log in the directory where all other cocoon 
logs get written to.


Rolf Schumacher wrote:

> John L. Webber wrote:
>> Anna,
>> There's a very detailed article on the Cocoon Wiki: 
>> Anna Bikkina wrote:
>>> Hi,
>>> I want to log some details to a user defined log file(specified in 
>>> web.xml).
>>> How can I do that from my xsp,java and xsp files used in the cocoon. 
>>> Can someone please direct me to some examples.
> Anna, do you managed to use Cocoons log facilities?
> I don't. Maybe I'm too blind to see "how simple" it is
> or this might be a facility for those super smart people
> of the (ever shrinking) inner circle.
> Rolf

View raw message