dcsimg
How to change the pattern of HTMLLayout in log4j. I need to display columns which i want.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   shashidar_pabolu
Posted On:   Monday, August 13, 2007 04:56 PM

I have a situation where in i need to log to a HTML file.
I want to change the pattern which Log4j writes the logs into html file.

Can anyone help me achieve this. I am using log4j 1.2.8.

Thanks in advance
Shashidar.


Logger log = Logger.getLogger("AdminMessage");
HTMLLayout myLayout = new HTMLLayout();
Appender myAppender = new FileAppender(myLayout, "hello.html");
log.addAppender(myAppender);
log.setLevel((Level) Level.DEBUG);
log.debug("Hello");

About | Sitemap | Contact