camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: [SPAM] Re: Custom log messages
Date Tue, 16 Sep 2008 10:41:19 GMT

You can prefix the categoy (package name) with the same prefix


And have them logged in the same file = special

log4j.appender.special.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: James Strachan [] 
Sent: 16. september 2008 12:34
Subject: [SPAM] Re: Custom log messages

2008/9/16 raulvk.soa <>:
> Nevermind. Sorry I got confused. Obviously you can make different log
> categories use the same Appender!
> That would be a temporary solution, as architecturally speaking we would be
> overloading the log4j with an awful amount of loggers, which I am not happy
> doing.
> Do you think it is feasible to achieve this by extending the Logger class
> and using it as a processor? What method would I have to override? Any
> special considerations? I think I may attempt to do this...

I'm not quite sure I follow. Claus's example uses a single Logger
called "ValidatingAgainstXMLSchema" or whatever. i.e. you can use a
single Logger if you want - the URI log:foo defines the logger to use.
There's not one per message or anything like that. Each different log
URI uses a different logger, so its up to you to define how many
different logger/categories you want to use.


Open Source Integration

View raw message