1.log4j代碼中修改輸出級別:
如:
protected final Logger logger = LoggerFactory.getLogger(Test.class);
將其轉成實現類,修改輸出級別即可
System.out.println(logger.isDebugEnabled()?"debug is true":"debug is false");
ch.qos.logback.classic.Logger cLogger= (ch.qos.logback.classic.Logger)logger;
cLogger.setLevel(Level.INFO);
System.out.println(logger.isDebugEnabled()?"debug is true":"debug is false");
2.log4j配置相關資料:
基本:http://blog.csdn.net/azheng270/article/details/2173430/
分文件輸出:
這個也似乎沒什么問題[尚未驗證]:https://www.cnblogs.com/yidaxia/p/5820036.html
經驗證,最終還是這個說的OK:http://blog.csdn.net/hu_shengyang/article/details/6754031
3.配置Log輸出的相對路徑:
http://blog.csdn.net/whoopee/article/details/851416