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().


HTH
Jorg



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to