cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: Log4j - logging request uri
Date Wed, 12 Oct 2005 08:29:08 GMT
Jorg Heymans wrote:
> Wojciech Gdela wrote:
> 
>>I've switched logging in my cocoon 2.1.7 app to log4j with the help of
>>org.apache.avalon.excalibur.logger.Log4JLoggerManager in web.xml.
>>
>>I would like to put request uri in my PatternLayout, is there a way to
>>do it?
>>
>>Now I have pattern: %d{ISO8601} %p [%c] - %m%n
>>
>>And I get in my logs:
>>2005-10-11 11:46:26,227 ERROR [sitemap.handled-errors] - Not found
>>
>>I would like something like:
>>2005-10-11 11:46:26,227 ERROR [sitemap.handled-errors] - (/foo/bla) Not
>>found
> 
> 
> Create a component that implements the o.a.c.RequestListener interface.
> In its methods you can set set/remove the log4j diagnostic context with
> req.getRequestURI().
That's useful! And should be wikified IMO :) Can I implement a 
OpenSessionInView pattern with this?

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message