首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

用log4j如何使日志按线程名分成几个文件记录每个线程的日志? java

2012-01-19 
用log4j怎么使日志按线程名分成几个文件记录每个线程的日志? java用log4j怎么使日志按线程名分成几个文件

用log4j怎么使日志按线程名分成几个文件记录每个线程的日志? java
用log4j怎么使日志按线程名分成几个文件记录每个线程的日志?
可以么???
有可参考的资料么?

[解决办法]
分也太少了吧


solution:
1. create several "log4j.properties "(They can have different names), in which we can define different files.
2. In the thread which needs different log file, add this at first:
PropertyConfigurator.configure( "thread1\\loginLOG.properties ");

热点排行