?? log4j.java
字號:
/*
* Created on 2005-8-17
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package cn.ac.ict;
import java.net.URL;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
/**
* @author zhw
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Log4j {
public static Logger
logger = Logger.getLogger(cn.ac.ict.Log4j.class.getName());
//調用配置文件
public static void ConfigLog() {
String resource = "ConfigLog.properties";
URL configFileResource =
cn.ac.ict.Log4j.class.getResource(resource);
PropertyConfigurator.configure(configFileResource);
}
//調用配置文件二(日志換行輸出)
public static void ConfigLog_ln() {
String resource = "ConfigLog_ln.properties";
URL configFileResource =
cn.ac.ict.Log4j.class.getResource(resource);
PropertyConfigurator.configure(configFileResource);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -