当前位置: 代码迷 >> J2SE >> 用log4j如何使日志按线程名分成几个文件记录每个线程的日志? java
  详细解决方案

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

热度:240   发布时间:2016-04-24 17:59:21.0
用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 ");
  相关解决方案