Package ch.qos.logback.classic.net

Examples of ch.qos.logback.classic.net.SimpleSocketServer


  }

  public void startup() {
    ShuttingDownOnUncaughtException uncaughtExceptionHandler = new ShuttingDownOnUncaughtException(this);
    Thread.setDefaultUncaughtExceptionHandler(uncaughtExceptionHandler);
    simpleSocketServer = new SimpleSocketServer((LoggerContext) LoggerFactory.getILoggerFactory(), coreConfiguration.getLoggingPort());
    simpleSocketServer.start();

    logger.info("Hydra Core creating connector, {}='{}', {}='{}'",
        DatabaseConfiguration.DATABASE_URL_PARAM, coreConfiguration.getDatabaseUrl(),
        DatabaseConfiguration.DATABASE_NAMESPACE, coreConfiguration.getNamespace());
View Full Code Here


      final String controllerCreateTypeEncoded = URLEncoder.encode ("#mosaic-components:java-component-container", "UTF-8");
      final String controllerCreateConfigurationEncoded = URLEncoder.encode (DefaultJsonCoder.defaultInstance.encodeToString (controllerCreateConfiguration), "UTF-8");
      controllerCreateUrlArguments = new String[] {String.format ("type=%s", controllerCreateTypeEncoded), String.format ("configuration=%s", controllerCreateConfigurationEncoded), "count=1"};
    }
    final ClasspathExporter exporter = ClasspathExporter.create (exporterAddress, classLoader, exceptions);
    final SimpleSocketServer appender = new SimpleSocketServer ((LoggerContext) LoggerFactory.getILoggerFactory (), appenderAddress.getPort ());
    Threading.registerExitCallback (threading, BasicComponentRemoteLauncher.class, "exit-hook-2", new Runnable () {
      @Override
      public final void run ()
      {
        logger.debug ("stopping exporter...");
        try {
          exporter.stopServer ();
        } catch (final Throwable exception) {
          exceptions.trace (ExceptionResolution.Ignored, exception);
          logger.error ("failed stopping exporter; ignoring!", exception);
        }
        logger.debug ("sopping appender...");
        try {
          appender.close ();
        } catch (final Throwable exception) {
          exceptions.trace (ExceptionResolution.Ignored, exception);
          logger.error ("failed stopping appender; ignoring!", exception);
        }
      }
    });
    logger.debug ("starting exporter...");
    try {
      exporter.startServer ();
    } catch (final Throwable exception) {
      exceptions.trace (ExceptionResolution.Ignored, exception);
      logger.error ("failed starting exporter; ignoring!", exception);
      throw (new Error (exception));
    }
    logger.debug ("starting appender...");
    try {
      appender.start ();
    } catch (final Throwable exception) {
      exceptions.trace (ExceptionResolution.Ignored, exception);
      logger.error ("failed starting appender; ignoring!", exception);
      throw (new Error (exception));
    }
View Full Code Here

TOP

Related Classes of ch.qos.logback.classic.net.SimpleSocketServer

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.