/**
* 装载Log4j 配置文件
*
*/
public static final void loadLog4jConfig(){
Properties prop = new Properties();
try {
FileInputStream stream=new FileInputStream("/var/conf/bin/log4j.properties");
prop.load(stream);
stream.close();//这样log4j对配置文件可以放置在任何位置
PropertyConfigurator.configure(prop);//装入log4j配置信息
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}