Examples of LoggingConfig


Examples of com.spotify.helios.common.LoggingConfig

  @Test
  public void testSentryAppender() throws Exception {
    // start our UDP server which will receive sentry messages
    final UdpServer udpServer = new UdpServer(sentryPort);
    // turn on logging which enables the sentry appender
    final LoggingConfig config = new LoggingConfig(0, true, null, false);
    ServiceMain.setupLogging(config, testDsn);
    // log a message at error level so sentry appender sends it to UDP server
    log.error("Ignore test message printed by Helios SentryTest");
    // be nice and turn logging back off
    LoggingConfigurator.configureNoLogging();
View Full Code Here

Examples of com.spotify.helios.common.LoggingConfig

  public Namespace getNamespace() {
    return options;
  }

  public LoggingConfig getLoggingConfig() {
    return new LoggingConfig(options.getInt(verboseArg.getDest()),
                             options.getBoolean(syslogArg.getDest()),
                             (File) options.get(logconfigArg.getDest()),
                             options.getBoolean(noLogSetupArg.getDest()));
  }
View Full Code Here

Examples of com.spotify.helios.common.LoggingConfig

      return 1;
    }
  }

  private void setupLogging() {
    final LoggingConfig config = parser.getLoggingConfig();
    if (config.getNoLogSetup()) {
      return;
    }
    final int verbose = config.getVerbosity();
    final Level level = get(asList(WARN, INFO, DEBUG, ALL), verbose, ALL);
    final Logger rootLogger = (Logger) LoggerFactory.getLogger(ROOT_LOGGER_NAME);
    rootLogger.setLevel(level);
  }
View Full Code Here

Examples of com.spotify.helios.common.LoggingConfig

    this.command = (CliCommand) options.get("command");
    final String username = options.getString(globalArgs.usernameArg.getDest());
    this.username = (username == null) ? cliConfig.getUsername() : username;
    this.json = equal(options.getBoolean(globalArgs.jsonArg.getDest()), true);
    this.loggingConfig = new LoggingConfig(options.getInt(globalArgs.verbose.getDest()),
                                           false, null,
                                           options.getBoolean(globalArgs.noLogSetup.getDest()));

    // Merge domains and explicit endpoints into master endpoints
    final List<String> explicitEndpoints = options.getList(globalArgs.masterArg.getDest());
View Full Code Here

Examples of greed.conf.schema.LoggingConfig

*/
public class ExternalSystemTest {

    @Before
    public void init() {
        LoggingConfig config = new LoggingConfig();
        config.setLogLevel(LoggingConfig.LoggingLevel.DEBUG);
        config.setLogToStderr(true);
        config.setLogFolder("Logs");
        Log.initialize(config);
    }
View Full Code Here

Examples of hirondelle.web4j.webmaster.LoggingConfig

    return result;
  }

  /** Execute the configured implementation of {@link LoggingConfig}.  */
  private static void executeLoggingConfig(ServletConfig aConfig) throws AppException {
    LoggingConfig loggingConfig = forLoggingConfig();
    loggingConfig.setup(aConfig);
  }
View Full Code Here

Examples of org.jwebsocket.config.LoggingConfig

  /**
   * {@inheritDoc}
   */
  @Override
  public void initializeLogging() {
    LoggingConfig lLoggingConfig = mConfig.getLoggingConfig();
    // initialize log4j logging engine
    // BEFORE instantiating any jWebSocket classes
    Logging.initLogs(lLoggingConfig.getLevel(), lLoggingConfig.getAppender(),
        lLoggingConfig.getFilename(), lLoggingConfig.getPattern(),
        lLoggingConfig.getBufferSize(),
        new String[]{"%JWEBSOCKET_HOME%/logs", "%CATALINA_HOME%/logs"});
    mLog = Logging.getLogger(JWebSocketXmlConfigInitializer.class);
    if (mLog.isDebugEnabled()) {
      mLog.debug("Logging settings"
          + ": appender: " + lLoggingConfig.getAppender()
          + ", filename: " + lLoggingConfig.getFilename()
          + ", level: " + lLoggingConfig.getLevel()
          + ", buffersize: " + lLoggingConfig.getBufferSize()
          + ", pattern: " + lLoggingConfig.getPattern());
    }
    if (mLog.isDebugEnabled()) {
      mLog.debug("Starting jWebSocket Server Sub System...");
    }
  }
View Full Code Here

Examples of org.jwebsocket.config.LoggingConfig

    System.out.println("jWebSocket Ver. " + JWebSocketServerConstants.VERSION_STR + " (" + System.getProperty("sun.arch.data.model") + "bit)");
    System.out.println(JWebSocketCommonConstants.COPYRIGHT);
    System.out.println(JWebSocketCommonConstants.LICENSE);

    // initialize the logging system
    LoggingConfig lLoggingConfig = new LoggingConfig(
        "console", // target
        "%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %C{1}: %m%n", // pattern
        "debug", // level
        "jWebSocket.log", // file name, if logging to file only
        4096 // bufferSize, if logging to file only
View Full Code Here

Examples of org.jwebsocket.config.LoggingConfig

        while (streamReader.hasNext()) {
            streamReader.next();
            if (streamReader.isStartElement()) {
                String elementName = streamReader.getLocalName();
                if (elementName.equals(ELEMENT_LOG4J)) {
                    LoggingConfig loggingConfig = (LoggingConfig) handlerContext.get(elementName).processConfig(streamReader);
                    loggingConfigs.add(loggingConfig);
                }
            }
            if (streamReader.isEndElement()) {
                String elementName = streamReader.getLocalName();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.