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 adam <aa...@columbiaexchange.com> on 2004/04/22 16:19:25 UTC

html appender help

Hello.

 

 

I am trying to configure an HTML appender. However I cannot find any 

examples or documentation on using html appenders. I have included the

configuration that I am using now:

    

  <appender name="HtmlAppender"
class="org.apache.log4j.DailyRollingFileAppender">

          <param name="File" value="/log/ShortResults.html"/>

          <param name="DatePattern" value="'.'yyyy-MM-dd'.html'"/>

          <layout class="org.apache.log4j.HTMLLayout"/>

    </appender>

 

Basically the format of the log file is:

Time | Thread | Level | Category | Message

 

However: 

-          time is expressed as milliseconds: 53772647. I would like
something like: 15:58:15.582

-          Thread, Level and Category are not useful and I would like to
suppress them

  

So, I was wondering if anyone has an example of full configuration for an
html appender.

 

Thanks in advance.

 

Adam Alex.

 


Re: html appender help

Posted by James <xh...@yahoo.com>.
you are using DailyRollingFileAppender with
HTMLLayout. You can write your own layout just like
HTMLLayout. I have my own with few column and use
DateFormat.format() to get the date time.

--- adam <aa...@columbiaexchange.com> wrote:
> Hello.
> 
>  
> 
>  
> 
> I am trying to configure an HTML appender. However I
> cannot find any 
> 
> examples or documentation on using html appenders. I
> have included the
> 
> configuration that I am using now:
> 
>     
> 
>   <appender name="HtmlAppender"
> class="org.apache.log4j.DailyRollingFileAppender">
> 
>           <param name="File"
> value="/log/ShortResults.html"/>
> 
>           <param name="DatePattern"
> value="'.'yyyy-MM-dd'.html'"/>
> 
>           <layout
> class="org.apache.log4j.HTMLLayout"/>
> 
>     </appender>
> 
>  
> 
> Basically the format of the log file is:
> 
> Time | Thread | Level | Category | Message
> 
>  
> 
> However: 
> 
> -          time is expressed as milliseconds:
> 53772647. I would like
> something like: 15:58:15.582
> 
> -          Thread, Level and Category are not useful
> and I would like to
> suppress them
> 
>   
> 
> So, I was wondering if anyone has an example of full
> configuration for an
> html appender.
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Adam Alex.
> 
>  
> 
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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