Package org.openqa.selenium.server.log

Examples of org.openqa.selenium.server.log.TerseFormatter


        }
        LoggingManager.configureLogging(configuration, false);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
        return configuration;
    }
View Full Code Here


    private void configureLogging() throws Exception {
        LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
    }
View Full Code Here

    private void configureLogging() throws Exception {
        LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
    }
View Full Code Here

    private void configureLogging() throws Exception {
        LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
    }
View Full Code Here

  private void configureLogging() throws Exception {
      LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
      Logger logger = Logger.getLogger("");
      for (Handler handler : logger.getHandlers()) {
          if (handler instanceof StdOutHandler) {
              handler.setFormatter(new TerseFormatter(true));
              break;
          }
      }
  }
View Full Code Here

                if (formatter instanceof SimpleFormatter) {
                    /* DGF Nobody likes the SimpleFormatter; surely they
                     * wanted our terse formatter instead.
                     * Furthermore, we all want DEBUG/INFO on stdout and WARN/ERROR on stderr */
                    Level originalLevel = handler.getLevel();
                    handler.setFormatter(new TerseFormatter(false));
                    handler.setLevel(Level.WARNING);
                    StdOutHandler stdOutHandler = new StdOutHandler();
                    stdOutHandler.setFormatter(new TerseFormatter(false));
                    stdOutHandler.setFilter(new MaxLevelFilter(Level.INFO));
                    stdOutHandler.setLevel(originalLevel);
                    logger.addHandler(stdOutHandler);
                    if (isDebugMode()) {
                        if (originalLevel.intValue() > Level.FINE.intValue()) {
                            stdOutHandler.setLevel(Level.FINE);
                        }
                    }
                }
            }
        }
       
        if (isDebugMode()) {
            logger.setLevel(Level.FINE);
        }
       
        log = LogFactory.getLog(SeleniumServer.class);
        if (logOutFileName==null && System.getProperty("selenium.log")!=null) {
            logOutFileName = System.getProperty("selenium.log");
        }
        if (logOutFileName!=null) {
            try {
                File logFile = new File(logOutFileName);
                FileHandler fileHandler = seleniumFileHandlers.get(logFile);
                if (fileHandler == null) {
                    fileHandler = new FileHandler(logFile.getAbsolutePath());
                    seleniumFileHandlers.put(logFile, fileHandler);
                }  
                fileHandler.setFormatter(new TerseFormatter(true));
                logger.setLevel(Level.FINE);
                fileHandler.setLevel(Level.FINE);
                logger.addHandler(fileHandler);
                log.info("Writing debug logs to " + logFile.getAbsolutePath());
            } catch (IOException e) {
View Full Code Here

        SeleniumServer.setDebugMode(true);
        LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
    }
View Full Code Here

      SeleniumServer.setDebugMode(true);
      LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
      Logger logger = Logger.getLogger("");
      for (Handler handler : logger.getHandlers()) {
          if (handler instanceof StdOutHandler) {
              handler.setFormatter(new TerseFormatter(true));
              break;
          }
      }
  }
View Full Code Here

        }
        LoggingManager.configureLogging(configuration, false);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
        return configuration;
    }
View Full Code Here

        SeleniumServer.setDebugMode(true);
        LoggingManager.configureLogging(new RemoteControlConfiguration(), true);
        Logger logger = Logger.getLogger("");
        for (Handler handler : logger.getHandlers()) {
            if (handler instanceof StdOutHandler) {
                handler.setFormatter(new TerseFormatter(true));
                break;
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.server.log.TerseFormatter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.