RCP開發---Log4j配置
摘要: 在啟動RCP的插件中的start方法里:
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
Properties prop = new Properties();
try {
prop.load(Activator.class.getResourceAsStream("log4j.properties")); //$NON-NLS-1$
} catch (IOException e) {
// e.printStackTrace();
}
PropertyConfigurator.configure(prop);
} 閱讀全文
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
Properties prop = new Properties();
try {
prop.load(Activator.class.getResourceAsStream("log4j.properties")); //$NON-NLS-1$
} catch (IOException e) {
// e.printStackTrace();
}
PropertyConfigurator.configure(prop);
} 閱讀全文
posted @ 2012-04-28 17:56 Ke 閱讀(970) | 評論 (0) 編輯