Hi Paul,
  Got your point and thanks a ton for your suggestions.
  I used the specific logger and it is working.
  However, what this logger is doing,  It is filtering logs from the chainsaw 
itself,
  1) that means now my logs are not coming into chainsaw but it is directly 
going to the log file which I dont want.
   
  Specifically I want that it should display logs to the chainsaw but while 
storing that into log file, it only stores the logs of my application not 
internal chainsaw logs.
   
   2) In my application I have more then one logger, so to get logs from all, 
the general solution I can think is paste the same appender number of times and 
just change the logger name, this way it can work but is it possible that I can 
specify all my loggers at one place with just one appender? How can I do that?

thanks in advance.
Paul Smith <[EMAIL PROTECTED]> wrote:  
On 21/06/2007, at 2:50 PM, akshay kumar wrote:

> Hi Paul,
> great!!..It is working fine now!
> However I got few more confusions!!..:(
> 1) As I am using pattern layout, I am not able to Drag and Drop 
> this file into my chainsaw
> And if I use XML layout instead of patternlayout the Timestamp 
> information comes in the log file is weird. I want the timestamp in 
> ISO8601 format only. Please tell me what can be the solution.

The solution is to have 2 appenders: 1 in XMLLayout format, the other 
in the human-readable format. If you name these log files 
appropriately and put them side by side each other, then you can view 
one with some other tool, and drag it's companion XML version into 
Chainsaw.

> 2) If I want to filter the chainsaw internal logs in my log file 
> how can I do that?

Only attach the XMLLayout and/or PatternLayout appenders to the root 
logger of your own package naming hierarchy. Right now you have 
attached them to the root logger. If your own logging events belong 
to, say, the 'com.mycompany.myproduct.LoggerA' Logger, then you could 
attach the appender to the "com.mycompany" logger. Something like:

class="org.apache.log4j.DailyRollingFileAppender">








value="[%d{ISO8601} %-5p][%20.20c][%t] %m%n"
/>



....(do the same sort of thing for XML version, just use a different 
Layout)

....






...

Paul

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



 
---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.

Reply via email to