コード例 #1
0
ファイル: IMServer.java プロジェクト: taojiaenx/taojiane_push
 /**
  * 系统参数配置
  *
  * @throws Exception
  */
 public void initSystem() throws Exception {
   PropertyConfigurator.configure("Log4j.properties");
   InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
   log.info(System.getProperty("file.encoding"));
   System.setProperty(
       "io.netty.recycler.maxCapacity.default",
       PropertyUtil.getProperty("io.netty.recycler.maxCapacity.default"));
   System.setProperty("io.netty.leakDetectionLevel", "paranoid");
   DbHelper.init();
 }
コード例 #2
0
 static {
   ResourceLeakDetector.setLevel(Level.PARANOID);
   InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
   // need to create a test logger that searches the log output for leaks
   // and fail the test and kill the world
 }