logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tom ONeill" <beagleboythefi...@hotmail.com>
Subject RE: log4j using appender but not specified pattern
Date Mon, 06 Oct 2003 17:39:41 GMT
Hi Jeffrey,
Thanks for your comments.
Actually it only overrides two of the four defined toLevel methods. Thw two 
that are overridden will validly identify trace as a log level. Could the 
fact that the other two toLevel methods are not overridden to recognise the 
trace method be causing my problem. I dont see how the priority level should 
affect the the format used by an appender though....

Tom


>From: "Mock, Jeffrey" <jmock@dsrnet.com>
>Reply-To: "Log4J Users List" <log4j-user@jakarta.apache.org>
>To: "Log4J Users List" <log4j-user@jakarta.apache.org>
>Subject: RE: log4j using appender but not specified pattern
>Date: Fri, 3 Oct 2003 11:57:13 -0400
>
>Tom,
>
>I'm wondering if the custom trace level 'OurLogLevel' overrides all of
>the necessary methods in order to accurately identify "trace" as a valid
>Level.  I experience the same problem you are having when I attempted to
>add a custom level.  Does the OurLogLevel class have 'overrides' for the
>toLevel() methods?
>
>Jeff
>
>-----Original Message-----
>From: tom ONeill [mailto:beagleboythefirst@hotmail.com]
>Sent: Friday, October 03, 2003 4:37 AM
>To: log4j-user@jakarta.apache.org
>Subject: log4j using appender but not specified pattern
>
>Hi all,
>
>I was wondering if anyone could give me some ideas on what might be
>causing
>a small problem that I have. In my log4j properties file (XML format) I
>have
>set up a particular appender that writes to a file. I have also
>specified a
>particular Pattern for the appender. Now the logging entries are being
>written to the appender but are not using the pattern that I specified.
>
>The appender is specified in the logging file as follows
>
><appender name="PerfAppender" class="org.apache.log4j.FileAppender">
>             <param name="File"   value="Perf.log" />
>             <param name="Append" value="true" />
>             <layout class="org.apache.log4j.PatternLayout">
>                <param name="ConversionPattern" value="%d - %m%n"/>
>             </layout>
></appender>
>
>This appender is then associated with a a particular logger as follows:
>
><logger name="MainLog">
>             <level class="de.start.sip.tools.logging.OurLogLevel"
>value="trace"/>
>             <appender-ref ref="PerfAppender" />
></logger>
>
>
>When I execute my application the Perf.log file is being written however
>it
>does not include the datetime which I would expect from using %d in the
>specified pattern for the appender. Not all the code is my own so its
>possible that there is somthing going on that I dont know about but what
>I
>need to know is the possible ways in which an appender could be used
>without
>actually using the specified pattern?
>
>Thanks,
>
>Tom
>
>_________________________________________________________________
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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


Mime
View raw message