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 bryan hansen <bh...@yahoo.com> on 2002/04/30 00:38:33 UTC

HTMLLayout

I was thinking about logging errors from our
application to a log file. I believe that i can do
this with the HTMLLayout class in log4j, but was not
quite sure how to go about it. Does anybody have a url
or a code sample that shows how to do this? I guess it
would really just need to be the properties file if I
am not mistaken?!

Thanks for any help,

Bryan

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: HTMLLayout

Posted by Maha Asad <ma...@yahoo.com>.
Hi, hope this will help
The options for HTMLLayout are: 
1.LocationInfo: which is set to false by default, u
can set it to true if u want the LocationInfo to
appear
2.Title: which will be the title for the HTML log
page.

Here is a sample:
 
#file appender
log4j.rootLogger=ERROR, logfile
log4j.appender.logfile=org.apache.log4j.FileAppender
log4j.appender.logfile.File=logFile.html
log4j.appender.logfile.Append=false
log4j.appender.logfile.layout=org.apache.log4j.HTMLLayout
log4j.appender.logfile.layout.LocationInfo=true
log4j.appender.logfile.layout.Title=My Log Errors

Good Luck
Maha 

--- bryan hansen <bh...@yahoo.com> wrote:
> I was thinking about logging errors from our
> application to a log file. I believe that i can do
> this with the HTMLLayout class in log4j, but was not
> quite sure how to go about it. Does anybody have a
> url
> or a code sample that shows how to do this? I guess
> it
> would really just need to be the properties file if
> I
> am not mistaken?!
> 
> Thanks for any help,
> 
> Bryan
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>