Package com.spotify.helios.common

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


  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

      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

    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

TOP

Related Classes of com.spotify.helios.common.LoggingConfig

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.