On Sat, Aug 30, 2008 at 05:21:51PM +0000, praveen#123 wrote:
> 
> 
> can any one healp me
>  to log single line to a diffrent log file and all other logs of the same
> class to the other log file

I only know of two straightforward ways to do this:

1) Create two loggers which could then do whatever you want... for
instance:

  com.foo.myclass
  com.foo.myclass.SPECIAL

You could then log the "special" line to it's own log file by attaching
a new appeneder to the special category, and it would also bubble up to
its the real appender if that is so desired.  This would require code
modification, of course.


2) You could potentially do this without modification as well...  If
there is a string in the log message that is unique enough, you can use
a filter:

http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/spi/Filter.html


-- 
David Britton

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

Reply via email to