Welogic的Log4j日志设置

时间:2022-12-22 17:19:56

基本上使用log4j的包放入到WEB-INF/lib/下

log4j.properties放到WEB-INF/classes下

即可。有文档说有其他设置,没必要了。

 

test.jsp

 

log4j.properties

 

java文件中

在domain下查看日志文件如下:

 

C:/bea/user_projects/domains/mydomain

结果:testLog.log


[LOG Log] 2010-11-07 17:48:02,437 ==> Message   from   Log4j  <== Test   Message: :128 
[LOG Log] 2010-11-07 17:57:54,312 ==> Message   from   Log4j  <== Test   Message: :128 
[LOG Log] 2010-11-07 18:03:42,265 ==> Message   from   Log4j  <== Test   Message: :128 
[LOG Log] 2010-11-07 18:08:21,343 ==> Message   from   Log4j  <== Test   Message: :128 
[LOG Log] 2010-11-07 18:35:59,500 ==> Message   from   Log4j  <== Test   Message: :128 
[LOG Log] 2010-11-07 18:36:02,406 ==> action  <== test:72