Esempio n. 1
0
 /**
  * 系统参数配置
  *
  * @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();
 }
 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
 }