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. 2) If I want to filter the chainsaw internal logs in my log file how can I do that? I tried to use specific logger as below to store only my application logs in the log file, but it is not working and giving me an error. Can you please tell me what I did wrong in specifying logger?
<?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> <logger logger="logger.getlogger("org.apache.lo4j.com.abc.xyz")"/> <logger.setlevel((level)level.all/> <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.PatternLayout"> <param name="ConversionPattern" value="[%d{ISO8601} %-5p] [%t] [%C{2} (%F:%L) - %m%n]"/> </layout> </appender> Thanks in advance. <appender-ref ref="RollingFile"/> </log4j:configuration> Paul Smith <[EMAIL PROTECTED]> wrote: ahh, I missed this when I was looking at your config. Your definition of the layout is not using nested to set the configuration. Only the 'class' attribute in the section is used, all the others need to be nested s. Try this layout configuration snippet instead (this is just one copied from what I use) ... value="[%d{ISO8601} %-5p][%20.20c][%t] %m%n" /> ... Paul On 21/06/2007, at 8:15 AM, akshay kumar wrote: > HI , > Thanks for help! > However %d{ISO8601} didnt work. > below are the few logs that I am getting in the log file, which > include just a message part nothing else. > > Starting internal logs on console. > About to instantiate plugin of type > [org.apache.log4j.net.SocketReceiver] > plugin named as [SocketReceiver] > Pushing plugin on to the object stack. > In ParamAction setting parameter [Port] to value [4445]. > Popping plugin named [SocketReceiver] from the object stack > no applicable action for , current pattern is [/ > configuration/Param] > About to instantiate appender of type > [org.apache.log4j.RollingFileAppender] > Appender named as [RollingFile] > Pushing appender on to the object stack. > In ParamAction setting parameter [File] to value [C:\\chainsaw1.log]. > In ParamAction setting parameter [Append] to value [true]. > In ParamAction setting parameter [MaxFileSize] to value [1000KB]. > In ParamAction setting parameter [maxBackupIndex] to value [5]. > About to instantiate layout of type [org.apache.log4j.PatternLayout] > Pushing layout on top of the object stack. > No name attribute in element > Popping layout from the object stack > About to set the layout of the containing appender. > setFile called: C:\test1.log, true > setFile ended > Popping appender named [RollingFile] from the object stack > Pushing root logger on stack > Encapsulating logger name is [root], levelvalue is [debug]. > SocketReceiver closing server socket > root level set to DEBUG > Attaching appender named [RollingFile] to logger named [root]. > Removing root logger from top of stack. > Will stop writing internal logs on console. > Finished parsing. > Using 'file:///c:/test2.xml' for auto-configuration > in run-about to enter while not interrupted loop > > > thanks > Paul Smith wrote: > try using %d{ISO8601} instead of just %d > > if this doesn't work, can you post a few lines of logs that do get > written to the 'test1.log' file? > > Paul > On 21/06/2007, at 3:10 AM, akshay kumar wrote: > >> Hi there, >> 1)Is there any way that I can save the different Log-panel tab >> create when I receive logs from remote machine? >> Right now what happens is when I close the Chanisaw all log-panel >> tab and so all logs within that get erased, which is not suitable >> for my application. >> Please let me know how can I do that? >> >> 2) In an alternate way to save the logs I am using rolling file >> appender within the chainsaw receiver config. >> But the problem in that the log file test1.log doesnt have any >> timestamp information or anything else except message. >> below is my config. >> Please let me know what I did wrong in conversion pattern layout? >> >> >> >> >>> debug="true"> >> >> class="org.apache.log4j.net.SocketReceiver"> >> > >> > >>> class="org.apache.log4j.RollingFileAppender"> >> > >> > >> > >> > >>> d %-5p [%t] %C{2} (%F:%L) - %m%n" /> >> >> >> >> >> >> >> >> >> >> thanks in advance. >> >> >> >> --------------------------------- >> Ready for the edge of your seat? Check out tonight's top picks on >> Yahoo! TV. > > 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: [EMAIL PROTECTED] 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. > > > > > > > --------------------------------- > Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s > user panel and lay it on us. 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: [EMAIL PROTECTED] 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. --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.