Topic: 请问Log4J如何输出HTML格式的Log阿?

  Print this page

1.请问Log4J如何输出HTML格式的Log阿? Copy to clipboard
Posted by: jfml
Posted on: 2003-04-18 11:28

谢谢达人指点

2.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: rainman
Posted on: 2003-04-18 11:30

可以改变Log4J输出的Layout,可以自己写一个,也可以从已经有的上改造

3.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: jfml
Posted on: 2003-04-18 11:38

能否给个写好的学习一下呢

谢谢

4.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: why
Posted on: 2003-04-18 19:42

Log4j has HTMLLayout
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/HTMLLayout.html
you may extend it if you wish

in log4j.xml, use something like
log4j.appender.yourTarget.layout=org.apache.log4j.HTMLLayout

5.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: jfml
Posted on: 2003-04-18 20:06

我想用它来打印简单的HTML格式的数据报表

呵呵

不知道行8行

6.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: why
Posted on: 2003-04-18 21:49

I've never used HTMLLayout of log4j.
I would try XMLLayout instead to prepare the report.

7.Re:请问Log4J如何输出HTML格式的Log阿? [Re: CrazyJavar] Copy to clipboard
Posted by: godspeed3
Posted on: 2003-04-21 08:52

u can output the log event using xml layout, and then transform it use a xsl file. by this way,data and style is decoupled


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923