Hmm.  I tried your appender, but all I got was the message.  The date,
log name, and level wasn't written out.  Not sure whats up with that.
 
To bad there is no way to reformat the html layout, its very useful for
all the obvious reasons.  This seems like an unfortunate shortcoming to
me.
 
 
-S

________________________________

From: Paul Smith [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 16, 2005 5:46 PM
To: Log4J Users List
Subject: Re: ConversionPattern


I don't think the ConversionPattern is a supported property of
HTMLLayout. Try this instead: 

<appender name="File" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="${catalina.home}/logs/@[EMAIL PROTECTED]" />
<param name="Append" value="true" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{dd-MM-yyyy 

        HH:mm:ss} %c{1} %p %m%n"

/>
</layout>
</appender>


Paul

On 17/11/2005, at 8:48 AM, Steve Pruitt wrote:


        I specified a conversion pattern for an appender, but I get the
default
        format with milliseconds, thread, full logger name, etc. I did
read I
        could use a conversion pattern with most layouts?

        My configuration looks like:

        <appender class="org.apache.log4j.DailyRollingFileAppender"
        name="HFA">
        <param name="File" value="C:/Logs/mylog.html"/>
        <param name="DatePattern" value="#yyyy-MM-dd"/>
        <param name="ConversionPattern" value="%d{dd-MM-yyyy
        HH:mm:ss} %c{1} %p %m%n"/>
        <layout class="org.apache.log4j.HTMLLayout"/>
        </appender>

        Typical log entries are:

        Time Thread Level Category Message 
        939828 http8080-Processor8 ACTION com.services.component User
"admin"
        fetching "Folder" with object identifier "2000000000".

        940735 http8080-Processor8 ACTION com.services.component User
"admin"
        fetching "Folder" with object identifier "2000000000". 

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




Reply via email to