http://www.iteye.com/topic/483115,这篇文章介绍的很详细。

补充一下下关于log4j配置文件的读取方式。

  InputStream is =  GameServer.class.getResourceAsStream("/log4j.properties");    
  Properties  p  = new Properties();
  p.load(is);
  PropertyConfigurator.configure(p);

log4j.properties 是放在src的根目录下的。

相关文章:

  • 2022-03-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-29
  • 2022-12-23
  • 2021-11-22
  • 2021-07-02
  • 2022-12-23
  • 2022-02-28
相关资源
相似解决方案