Java 类org.openqa.selenium.logging.LoggingHandler 实例源码

项目:grid-refactor-remote-server    文件:DriverServlet.java   
@Override
public void init() throws ServletException {
  super.init();

  Logger logger = getLogger();
  logger.addHandler(LoggingHandler.getInstance());

  DriverSessions driverSessions = sessionsSupplier.get();
  commandHandler = new JsonHttpCommandHandler(driverSessions, logger);

  long sessionTimeOutInMs = getValueToUseInMs("webdriver.server.session.timeout", 1800);
  long browserTimeoutInMs = getValueToUseInMs("webdriver.server.browser.timeout", 0);

  if (sessionTimeOutInMs > 0 || browserTimeoutInMs > 0) {
    createSessionCleaner(logger, driverSessions, sessionTimeOutInMs, browserTimeoutInMs);
  }
}
项目:grid-refactor-remote-server    文件:DriverServlet.java   
@Override
public void destroy() {
  getLogger().removeHandler(LoggingHandler.getInstance());
  if (sessionCleaner != null) {
    sessionCleaner.stopCleaner();
  }
}