You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by ashish talati <aj...@yahoo.com> on 2007/06/18 06:51:45 UTC

Please help- Chainsaw Configuration

Hi there,
  
I used Rolling file appender in chainsaw Reciever configuration to
save the logs in one seprete local file.
It is working fine ,however I am facing following problems.
1) In the local file Logs are saved without any timestamp
information,I think it has to do with some layout pattern but couldnt
figure out.
below is my appender config in chainsaw,
   
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE log4j:configuration >
  <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
  <plugin name="SocketReceiver" class="org.apache.log4j.net.SocketReceiver">
  <param name="Port" value="4445"/>
  </plugin>
   
  <appender name="RollingFile" class="org.apache.log4j.RollingFileAppender">
  <param name="File" value="C:\\chainsaw1.log"/> 
  <param name="Append" value="true"/> 
  <param name="MaxFileSize" value="1000KB"/> 
  <param name="maxBackupIndex" value="5"/> 
  <layout class="org.apache.log4j.xml.XMLLayout"/>
  </appender> 
   
  <root>
  <level value="debug"/>
  <appender-ref ref="RollingFile"/> 
  </root>
  </log4j:configuration>


2) How can I filter/avoid the Chainsaw internal logs that comes in
"chainsaw-log" tab to store in the file along with my other logs. How
can I use some filter?

3) At the source side that is from where actual Socket appender is
sending logs to the chainsaw, what is the effect of Location
Info=true/false in rolling file appender..(I am using it)??.. I tried
both true and false in that but dont noticed any change at chainsaw side....the NDC,Line,Method
all fields are null in both cases.

  below is my appender config.
  #TEST
  #Level=ALL, Facility=USER
  log4j.debug=true
  log4j.rootLogger=all,Chainsaw1,Chainsaw2,STDOUT,R
  log4j.appender.Chainsaw1=org.apache.log4j.net.SocketAppender
  log4j.appender.Chainsaw1.remoteHost=localhost
  log4j.appender.Chainsaw1.port=4445
  log4j.appender.Chainsaw1.locationInfo=true
  log4j.appender.Chainsaw1.layout.ConversionPattern=%p: %c - %m
   
  log4j.appender.Chainsaw2=org.apache.log4j.net.SocketAppender
  log4j.appender.Chainsaw2.remoteHost=remotehost IP address
  log4j.appender.Chainsaw2.port=4445
  log4j.appender.Chainsaw2.locationInfo=true
  log4j.appender.Chainsaw2.layout.ConversionPattern=%p: %c - %m
   
   
  log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
  log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
  log4j.appender.STDOUT.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
   
  log4j.appender.R.File=${catalina.base}/logs/test1.log
  log4j.appender.R=org.apache.log4j.RollingFileAppender
  log4j.appender.R.MaxFileSize=3000KB
  log4j.appender.R.MaxBackupIndex=5
  log4j.appender.R.layout=org.apache.log4j.PatternLayout
  log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] %C{2} (%F:%L) - %m%n

   
  
4) when I Drag and drop the above XML file again in chainsaw it is
giving me following error,

"Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/log4j.dtd)
called"

and the logs are keep increasing with this error.
   
  Please help in solving this problems.

Thanks.



       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Re: Chainsaw Configuration

Posted by Paul Smith <ps...@aconex.com>.
Chainsaw only supports dragging and dropping XML formatted log files  
(that's why the tab says "Drag & Drop XML log files here").

Unfortunately Chainsaw is not auto-magic in it's ability to guess  
what the format of you text log file is, so this just isn't going to  
work for you.  Sorry.

Paul
On 21/06/2007, at 2:18 PM, ashish talati wrote:

> HI Paul,
>   below is some of my logs withing lof file that I am tryin to drag  
> and drop.
>
>   [2007-06-20 22:56:29,625 DEBUG] [javawsApplicationMain]  
> [action.ConfigurationAction (ConfigurationAction.java:42) -  
> Starting internal logs on console.
> ][2007-06-20 22:56:29,640 DEBUG] [javawsApplicationMain]  
> [action.PluginAction (PluginAction.java:45) - About to instantiate  
> plugin of type [org.apache.log4j.net.SocketReceiver]
> ][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain]  
> [action.PluginAction (PluginAction.java:59) - plugin named as  
> [SocketReceiver]
> ][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain]  
> [action.PluginAction (PluginAction.java:70) - Pushing plugin on to  
> the object stack.
> ][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain]  
> [action.ParamAction (ParamAction.java:61) - In ParamAction setting  
> parameter [Port] to value [4445].
> ][2007-06-20 22:56:29,671 DEBUG] [javawsApplicationMain]  
> [action.PluginAction (PluginAction.java:102) - Popping plugin named  
> [SocketReceiver] from the object stack
> ][2007-06-20 22:56:29,671 DEBUG] [javawsApplicationMain]  
> [action.AppenderAction (AppenderAction.java:52) - About to  
> instantiate appender of type [org.apache.log4j.RollingFileAppender]
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.AppenderAction (AppenderAction.java:67) - Appender named as  
> [RollingFile]
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.AppenderAction (AppenderAction.java:78) - Pushing appender  
> on to the object stack.
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.ParamAction (ParamAction.java:61) - In ParamAction setting  
> parameter [File] to value [C:\\chainsaw1.log].
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.ParamAction (ParamAction.java:61) - In ParamAction setting  
> parameter [Append] to value [true].
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.ParamAction (ParamAction.java:61) - In ParamAction setting  
> parameter [MaxFileSize] to value [1000KB].
> ][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain]  
> [action.ParamAction (ParamAction.java:61) - In ParamAction setting  
> parameter [maxBackupIndex] to value [5].
>
>   but I am getting following 4 error logs and it is keep repeating  
> infinitely.
>
> Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/ 
> log4j.dtd) called
>
>
> setFile called: C:\chainsaw1.log, true
>
>
> setFile ended
>
>
> Failure in post-close rollover action
>
> Is it having some problem with rolling file ?...because I set the  
> limit of rolling file as 1MB ,then also it keep increasing as 30Mb  
> or high??
>
> I will be thankful for any kind of your help.
>
> Regards,
>
>
>
>
>
>
>
> Paul Smith <ps...@aconex.com> wrote:
>   Are you able to build a short version of your log file that you are
> trying to drag and drop into Chainsaw and point out examples of rows
> that are being dropped?
>
> If you can post this to the list, we might be able to help.
>
> Paul
> On 19/06/2007, at 8:23 AM, ashish talati wrote:
>
>> Hi Paul,
>> Thanks for your help,
>> I can try another format,
>> how ever can you please look into my other problems that I
>> previously described?
>> That are regarding skipping some logs and drag and drop xml file
>> error!!!
>>
>> regards,
>>
>>
>>
>> Paul Smith
> wrote:
>>>
>>> Time 2007-06-18 11:50:02,223 ----> in the chainsaw
>>> log panel
>>>
>>> timestamp="1182185402223"---------> in the log file
>>>
>>
>> Since you are using the XMLLayout for the log file being written to
>> disk, this is the way that layout outputs the Timestamp, using the
>> epoch timeformat of "number of milliseconds since 1-1-1970", which is
>> what the internal format for storing time.
>>
>> If you don't want XML formatted logs, use a different Layout, such as
>> PatternLayout.
>>
>>
>>
>>> It looks entirely different except last 5 digits.
>>>
>>> 2)I really dont know how to configure specific logger for my
>>> rolling File appender.
>>> Can you give me specific example? (what can be logger hierarchy?)
>>> I tried to create as below ,but It is not working.
>>
>> I would suggest you first read the short manual available online:
>>
>> http://logging.apache.org/log4j/docs/manual.html
>>>
>>
>> If that and the JavaDoc documentation doesn't get you started I'd
>> highly recommend Ceki's commercial book on log4j.
>>
>> http://www.qos.ch/shop/products/eclm/
>>
>>
>> Paul
>>
>>
>> ---------------------------------
>> Be a better Heartthrob. Get better relationship answers from
>> someone who knows.
>> Yahoo! Answers - Check it out.
>
> Paul Smith
> Core Engineering Manager
>
> Aconex
> The easy way to save time and money on your project
>
> 696 Bourke Street, Melbourne,
> VIC 3000, Australia
> Tel: +61 3 9240 0200 Fax: +61 3 9240 0299
> Email: psmith@aconex.com www.aconex.com
>
> This email and any attachments are intended solely for the addressee.
> The contents may be privileged, confidential and/or subject to
> copyright or other applicable law. No confidentiality or privilege is
> lost by an erroneous transmission. If you have received this e-mail
> in error, please let us know by reply e-mail and delete or destroy
> this mail and all copies. If you are not the intended recipient of
> this message you must not disseminate, copy or take any action in
> reliance on it. The sender takes no responsibility for the effect of
> this message upon the recipient's computer system.
>
>
>
>
>
>
> ---------------------------------
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel to find your fit.

Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
Email: psmith@aconex.com  www.aconex.com

This email and any attachments are intended solely for the addressee.  
The contents may be privileged, confidential and/or subject to  
copyright or other applicable law. No confidentiality or privilege is  
lost by an erroneous transmission. If you have received this e-mail  
in error, please let us know by reply e-mail and delete or destroy  
this mail and all copies. If you are not the intended recipient of  
this message you must not disseminate, copy or take any action in  
reliance on it. The sender takes no responsibility for the effect of  
this message upon the recipient's computer system.




Chainsaw Configuration

Posted by ashish talati <aj...@yahoo.com>.
HI Paul,
  below is some of my logs withing lof file that I am tryin to drag and drop.
   
  [2007-06-20 22:56:29,625 DEBUG] [javawsApplicationMain] [action.ConfigurationAction (ConfigurationAction.java:42) - Starting internal logs on console.
][2007-06-20 22:56:29,640 DEBUG] [javawsApplicationMain] [action.PluginAction (PluginAction.java:45) - About to instantiate plugin of type [org.apache.log4j.net.SocketReceiver]
][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain] [action.PluginAction (PluginAction.java:59) - plugin named as [SocketReceiver]
][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain] [action.PluginAction (PluginAction.java:70) - Pushing plugin on to the object stack.
][2007-06-20 22:56:29,656 DEBUG] [javawsApplicationMain] [action.ParamAction (ParamAction.java:61) - In ParamAction setting parameter [Port] to value [4445].
][2007-06-20 22:56:29,671 DEBUG] [javawsApplicationMain] [action.PluginAction (PluginAction.java:102) - Popping plugin named [SocketReceiver] from the object stack
][2007-06-20 22:56:29,671 DEBUG] [javawsApplicationMain] [action.AppenderAction (AppenderAction.java:52) - About to instantiate appender of type [org.apache.log4j.RollingFileAppender]
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.AppenderAction (AppenderAction.java:67) - Appender named as [RollingFile]
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.AppenderAction (AppenderAction.java:78) - Pushing appender on to the object stack.
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.ParamAction (ParamAction.java:61) - In ParamAction setting parameter [File] to value [C:\\chainsaw1.log].
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.ParamAction (ParamAction.java:61) - In ParamAction setting parameter [Append] to value [true].
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.ParamAction (ParamAction.java:61) - In ParamAction setting parameter [MaxFileSize] to value [1000KB].
][2007-06-20 22:56:29,687 DEBUG] [javawsApplicationMain] [action.ParamAction (ParamAction.java:61) - In ParamAction setting parameter [maxBackupIndex] to value [5].

  but I am getting following 4 error logs and it is keep repeating infinitely.

Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/log4j.dtd) called


setFile called: C:\chainsaw1.log, true


setFile ended


Failure in post-close rollover action

Is it having some problem with rolling file ?...because I set the limit of rolling file as 1MB ,then also it keep increasing as 30Mb or high??

I will be thankful for any kind of your help.

Regards,

 



   
  
Paul Smith <ps...@aconex.com> wrote:
  Are you able to build a short version of your log file that you are 
trying to drag and drop into Chainsaw and point out examples of rows 
that are being dropped?

If you can post this to the list, we might be able to help.

Paul
On 19/06/2007, at 8:23 AM, ashish talati wrote:

> Hi Paul,
> Thanks for your help,
> I can try another format,
> how ever can you please look into my other problems that I 
> previously described?
> That are regarding skipping some logs and drag and drop xml file 
> error!!!
>
> regards,
>
>
>
> Paul Smith 
wrote:
>>
>> Time 2007-06-18 11:50:02,223 ----> in the chainsaw
>> log panel
>>
>> timestamp="1182185402223"---------> in the log file
>>
>
> Since you are using the XMLLayout for the log file being written to
> disk, this is the way that layout outputs the Timestamp, using the
> epoch timeformat of "number of milliseconds since 1-1-1970", which is
> what the internal format for storing time.
>
> If you don't want XML formatted logs, use a different Layout, such as
> PatternLayout.
>
>
>
>> It looks entirely different except last 5 digits.
>>
>> 2)I really dont know how to configure specific logger for my
>> rolling File appender.
>> Can you give me specific example? (what can be logger hierarchy?)
>> I tried to create as below ,but It is not working.
>
> I would suggest you first read the short manual available online:
>
> http://logging.apache.org/log4j/docs/manual.html
>>
>
> If that and the JavaDoc documentation doesn't get you started I'd
> highly recommend Ceki's commercial book on log4j.
>
> http://www.qos.ch/shop/products/eclm/
>
>
> Paul
>
>
> ---------------------------------
> Be a better Heartthrob. Get better relationship answers from 
> someone who knows.
> Yahoo! Answers - Check it out.

Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200 Fax: +61 3 9240 0299
Email: psmith@aconex.com www.aconex.com

This email and any attachments are intended solely for the addressee. 
The contents may be privileged, confidential and/or subject to 
copyright or other applicable law. No confidentiality or privilege is 
lost by an erroneous transmission. If you have received this e-mail 
in error, please let us know by reply e-mail and delete or destroy 
this mail and all copies. If you are not the intended recipient of 
this message you must not disseminate, copy or take any action in 
reliance on it. The sender takes no responsibility for the effect of 
this message upon the recipient's computer system.





 
---------------------------------
Now that's room service! Choose from over 150,000 hotels 
in 45,000 destinations on Yahoo! Travel to find your fit.

Re: Please help- Chainsaw Configuration

Posted by Paul Smith <ps...@aconex.com>.
Are you able to build a short version of your log file that you are  
trying to drag and drop into Chainsaw and point out examples of rows  
that are being dropped?

If you can post this to the list, we might be able to help.

Paul
On 19/06/2007, at 8:23 AM, ashish talati wrote:

> Hi Paul,
>   Thanks for your help,
>   I can try another format,
>   how ever can you please look into my other problems that I  
> previously described?
>   That are regarding skipping some logs and drag and drop xml file  
> error!!!
>
>   regards,
>
>
>
> Paul Smith <ps...@aconex.com> wrote:
>>
>> Time 2007-06-18 11:50:02,223 ----> in the chainsaw
>> log panel
>>
>> timestamp="1182185402223"---------> in the log file
>>
>
> Since you are using the XMLLayout for the log file being written to
> disk, this is the way that layout outputs the Timestamp, using the
> epoch timeformat of "number of milliseconds since 1-1-1970", which is
> what the internal format for storing time.
>
> If you don't want XML formatted logs, use a different Layout, such as
> PatternLayout.
>
>
>
>> It looks entirely different except last 5 digits.
>>
>> 2)I really dont know how to configure specific logger for my
>> rolling File appender.
>> Can you give me specific example? (what can be logger hierarchy?)
>> I tried to create as below ,but It is not working.
>
> I would suggest you first read the short manual available online:
>
> http://logging.apache.org/log4j/docs/manual.html
>>
>
> If that and the JavaDoc documentation doesn't get you started I'd
> highly recommend Ceki's commercial book on log4j.
>
> http://www.qos.ch/shop/products/eclm/
>
>
> Paul
>
>
> ---------------------------------
> Be a better Heartthrob. Get better relationship answers from  
> someone who knows.
> Yahoo! Answers - Check it out.

Paul Smith
Core Engineering Manager

Aconex
The easy way to save time and money on your project

696 Bourke Street, Melbourne,
VIC 3000, Australia
Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
Email: psmith@aconex.com  www.aconex.com

This email and any attachments are intended solely for the addressee.  
The contents may be privileged, confidential and/or subject to  
copyright or other applicable law. No confidentiality or privilege is  
lost by an erroneous transmission. If you have received this e-mail  
in error, please let us know by reply e-mail and delete or destroy  
this mail and all copies. If you are not the intended recipient of  
this message you must not disseminate, copy or take any action in  
reliance on it. The sender takes no responsibility for the effect of  
this message upon the recipient's computer system.




Re: Please help- Chainsaw Configuration

Posted by ashish talati <aj...@yahoo.com>.
Hi Paul,
  Thanks for your help,
  I can try another format,
  how ever can you please look into my other problems that I previously described?
  That are regarding skipping some logs and drag and drop xml file error!!!
   
  regards,
   
  

Paul Smith <ps...@aconex.com> wrote:
  >
> Time 2007-06-18 11:50:02,223 ----> in the chainsaw 
> log panel
>
> timestamp="1182185402223"---------> in the log file
>

Since you are using the XMLLayout for the log file being written to 
disk, this is the way that layout outputs the Timestamp, using the 
epoch timeformat of "number of milliseconds since 1-1-1970", which is 
what the internal format for storing time.

If you don't want XML formatted logs, use a different Layout, such as 
PatternLayout.



> It looks entirely different except last 5 digits.
>
> 2)I really dont know how to configure specific logger for my 
> rolling File appender.
> Can you give me specific example? (what can be logger hierarchy?)
> I tried to create as below ,but It is not working.

I would suggest you first read the short manual available online:

http://logging.apache.org/log4j/docs/manual.html
>

If that and the JavaDoc documentation doesn't get you started I'd 
highly recommend Ceki's commercial book on log4j.

http://www.qos.ch/shop/products/eclm/


Paul

       
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out. 

Re: Please help- Chainsaw Configuration

Posted by Paul Smith <ps...@aconex.com>.
>
>           Time   2007-06-18 11:50:02,223   ----> in the chainsaw  
> log panel
>
>   timestamp="1182185402223"---------> in the log file
>

Since you are using the XMLLayout for the log file being written to  
disk, this is the way that layout outputs the Timestamp, using the  
epoch timeformat of "number of milliseconds since 1-1-1970", which is  
what the internal format for storing time.

If you don't want XML formatted logs, use a different Layout, such as  
PatternLayout.



>   It looks entirely different except last 5 digits.
>
>   2)I really dont know how to configure specific logger for my  
> rolling File appender.
>   Can you give me specific example? (what can be logger hierarchy?)
>   I tried to create as below ,but It is not working.

I would suggest you first read the short manual available online:

http://logging.apache.org/log4j/docs/manual.html
>

If that and the JavaDoc documentation doesn't get you started I'd  
highly recommend Ceki's commercial book on log4j.

http://www.qos.ch/shop/products/eclm/


Paul

RE: Please help- Chainsaw Configuration

Posted by ashish talati <aj...@yahoo.com>.
Hi Scott,
  Thank you very much for your help,
  However I am still confused. Sorry for that as I am newbie in this so couldnt figure out.
   
  1) Regarding Timestamp , yes I am also getting in the log file but it is different then the timestamp in the Chainsaw log panel.
  below is the timestamp i m getting in the log panel and log file,
   
          Time   2007-06-18 11:50:02,223   ----> in the chainsaw log panel 
   
  timestamp="1182185402223"---------> in the log file
   
  It looks entirely different except last 5 digits.
   
  2)I really dont know how to configure specific logger for my rolling File appender.
  Can you give me specific example? (what can be logger hierarchy?)
  I tried to create as below ,but It is not working.
   
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE log4j:configuration>
  
  <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
   
  <plugin name="SocketReceiver" class="org.apache.log4j.net.SocketReceiver">
  <param name="Port" value="4445"/>
  </plugin>
   
  <log4j.logger.SocketReceiver_log=all,RollingFile>
  <appender name="RollingFile" class="org.apache.log4j.RollingFileAppender">
  <param name="File" value="C:\\chainsaw1.log"/> 
  <param name="Append" value="true"/> 
  <param name="MaxFileSize" value="1000KB"/> 
  <param name="maxBackupIndex" value="5"/> 
  <layout class="org.apache.log4j.xml.XMLLayout"/>
  </appender> 
  <root>
   
  <appender-ref ref="RollingFile"/> 
  </root> 
  </log4j:configuration>
   
  3) I observed that The logs are storing in the Log file ,however It is skipping first few (specifically in my case 9) logs, that means the log storing in local log file starts after small amount of time which skpis the first few logs. (that can be Disastrous in my application)
  Do you have any solution for this problem? 
   
  4)Drag and Drop XML file is still not working for me.
  Below are few logs from my XML file: (Right now I am just testing so its a internal chainsaw logs , I haven't implimented my application yet)
   
  <log4j:event logger="org.apache.log4j.joran.action.ConfigurationAction" timestamp="1182185395333" sequenceNumber="21" level="DEBUG" thread="javawsApplicationMain">
<log4j:message><![CDATA[Starting internal logs on console.]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
</log4j:properties>
</log4j:event>
   
  <log4j:event logger="org.apache.log4j.joran.action.PluginAction" timestamp="1182185395333" sequenceNumber="22" level="DEBUG" thread="javawsApplicationMain">
<log4j:message><![CDATA[About to instantiate plugin of type [org.apache.log4j.net.SocketReceiver]]]></log4j:message>
<log4j:properties>
    <log4j:data name="application" value="log"/>
    <log4j:data name="hostname" value="chainsaw"/>
</log4j:properties>
</log4j:event>
   
  And when I try to drag and drop this type of XML log files it gives me following logs and it keep increasing infinitely. ( I just pasted the messages that keep repeating)
   
          
Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/log4j.dtd) called


setFile called: C:\chainsaw1.log, true


setFile ended


Failure in post-close rollover action

I am really stuck in these issues , So please help me if you have any sollution for these.

Thanks.

Regards, 




  

Scott Deboy <sd...@comotivsystems.com> wrote:
  1. I see a 'timestamp' attribute in each event in chainsaw1.log (and see #4 - when I imported it, I got correct timestamps in the log file)

2. Don't configure your rollingfileappender as the root appender - instead, specify a specific logger (your logger hierarchy) with the rolling file appender.

3. There is a serialization incompatibility between log4j 1.2x socketappender and the log4j 1.3 socketreceiver..this is being fixed with our work to get Chainsaw and appenders into the 1.2 codebase (may be fixed in the next release)

4. it worked for me, provide more info (are these rolled files you're testing? If so, paste the first few lines of the file. My log file isn't an actual xml document with a root node - it contains ONLY log4j:event nodes.



Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR 97201

Telephone: 503.224.7496
Cell: 503.997.1367
Fax: 503.222.0185

sdeboy@comotivsystems.com

www.comotivsystems.com



-----Original Message-----
From: ashish talati [mailto:ajtalati@yahoo.com]
Sent: Sun 6/17/2007 9:51 PM
To: log4j-user@logging.apache.org
Subject: Please help- Chainsaw Configuration

Hi there,

I used Rolling file appender in chainsaw Reciever configuration to
save the logs in one seprete local file.
It is working fine ,however I am facing following problems.
1) In the local file Logs are saved without any timestamp
information,I think it has to do with some layout pattern but couldnt
figure out.
below is my appender config in chainsaw,






























2) How can I filter/avoid the Chainsaw internal logs that comes in
"chainsaw-log" tab to store in the file along with my other logs. How
can I use some filter?

3) At the source side that is from where actual Socket appender is
sending logs to the chainsaw, what is the effect of Location
Info=true/false in rolling file appender..(I am using it)??.. I tried
both true and false in that but dont noticed any change at chainsaw side....the NDC,Line,Method
all fields are null in both cases.

below is my appender config.
#TEST
#Level=ALL, Facility=USER
log4j.debug=true
log4j.rootLogger=all,Chainsaw1,Chainsaw2,STDOUT,R
log4j.appender.Chainsaw1=org.apache.log4j.net.SocketAppender
log4j.appender.Chainsaw1.remoteHost=localhost
log4j.appender.Chainsaw1.port=4445
log4j.appender.Chainsaw1.locationInfo=true
log4j.appender.Chainsaw1.layout.ConversionPattern=%p: %c - %m

log4j.appender.Chainsaw2=org.apache.log4j.net.SocketAppender
log4j.appender.Chainsaw2.remoteHost=remotehost IP address
log4j.appender.Chainsaw2.port=4445
log4j.appender.Chainsaw2.locationInfo=true
log4j.appender.Chainsaw2.layout.ConversionPattern=%p: %c - %m


log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

log4j.appender.R.File=${catalina.base}/logs/test1.log
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.MaxFileSize=3000KB
log4j.appender.R.MaxBackupIndex=5
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] %C{2} (%F:%L) - %m%n



4) when I Drag and drop the above XML file again in chainsaw it is
giving me following error,

"Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/log4j.dtd)
called"

and the logs are keep increasing with this error.

Please help in solving this problems.

Thanks.




---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 

RE: Please help- Chainsaw Configuration

Posted by Scott Deboy <sd...@comotivsystems.com>.
1. I see a 'timestamp' attribute in each event in chainsaw1.log (and see #4 - when I imported it, I got correct timestamps in the log file)

2. Don't configure your rollingfileappender as the root appender - instead, specify a specific logger (your logger hierarchy) with the rolling file appender.

3. There is a serialization incompatibility between log4j 1.2x socketappender and the log4j 1.3 socketreceiver..this is being fixed with our work to get Chainsaw and appenders into the 1.2 codebase (may be fixed in the next release)

4. it worked for me, provide more info (are these rolled files you're testing?  If so, paste the first few lines of the file.  My log file isn't an actual xml document with a root node - it contains ONLY log4j:event nodes.



Scott Deboy
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR  97201

Telephone:      503.224.7496
Cell:           503.997.1367
Fax:            503.222.0185

sdeboy@comotivsystems.com

www.comotivsystems.com



-----Original Message-----
From: ashish talati [mailto:ajtalati@yahoo.com]
Sent: Sun 6/17/2007 9:51 PM
To: log4j-user@logging.apache.org
Subject: Please help- Chainsaw Configuration
 
Hi there,
  
I used Rolling file appender in chainsaw Reciever configuration to
save the logs in one seprete local file.
It is working fine ,however I am facing following problems.
1) In the local file Logs are saved without any timestamp
information,I think it has to do with some layout pattern but couldnt
figure out.
below is my appender config in chainsaw,
   
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE log4j:configuration >
  <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">
  <plugin name="SocketReceiver" class="org.apache.log4j.net.SocketReceiver">
  <param name="Port" value="4445"/>
  </plugin>
   
  <appender name="RollingFile" class="org.apache.log4j.RollingFileAppender">
  <param name="File" value="C:\\chainsaw1.log"/> 
  <param name="Append" value="true"/> 
  <param name="MaxFileSize" value="1000KB"/> 
  <param name="maxBackupIndex" value="5"/> 
  <layout class="org.apache.log4j.xml.XMLLayout"/>
  </appender> 
   
  <root>
  <level value="debug"/>
  <appender-ref ref="RollingFile"/> 
  </root>
  </log4j:configuration>


2) How can I filter/avoid the Chainsaw internal logs that comes in
"chainsaw-log" tab to store in the file along with my other logs. How
can I use some filter?

3) At the source side that is from where actual Socket appender is
sending logs to the chainsaw, what is the effect of Location
Info=true/false in rolling file appender..(I am using it)??.. I tried
both true and false in that but dont noticed any change at chainsaw side....the NDC,Line,Method
all fields are null in both cases.

  below is my appender config.
  #TEST
  #Level=ALL, Facility=USER
  log4j.debug=true
  log4j.rootLogger=all,Chainsaw1,Chainsaw2,STDOUT,R
  log4j.appender.Chainsaw1=org.apache.log4j.net.SocketAppender
  log4j.appender.Chainsaw1.remoteHost=localhost
  log4j.appender.Chainsaw1.port=4445
  log4j.appender.Chainsaw1.locationInfo=true
  log4j.appender.Chainsaw1.layout.ConversionPattern=%p: %c - %m
   
  log4j.appender.Chainsaw2=org.apache.log4j.net.SocketAppender
  log4j.appender.Chainsaw2.remoteHost=remotehost IP address
  log4j.appender.Chainsaw2.port=4445
  log4j.appender.Chainsaw2.locationInfo=true
  log4j.appender.Chainsaw2.layout.ConversionPattern=%p: %c - %m
   
   
  log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
  log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
  log4j.appender.STDOUT.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
   
  log4j.appender.R.File=${catalina.base}/logs/test1.log
  log4j.appender.R=org.apache.log4j.RollingFileAppender
  log4j.appender.R.MaxFileSize=3000KB
  log4j.appender.R.MaxBackupIndex=5
  log4j.appender.R.layout=org.apache.log4j.PatternLayout
  log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] %C{2} (%F:%L) - %m%n

   
  
4) when I Drag and drop the above XML file again in chainsaw it is
giving me following error,

"Log4jEntityResolver.resolveEntity(null, dummy://log4j.dtd/log4j.dtd)
called"

and the logs are keep increasing with this error.
   
  Please help in solving this problems.

Thanks.



       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links.