Package ch.qos.logback.classic.joran

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()


        JoranConfigurator configurator = new JoranConfigurator();
        configurator.setContext(lc);
        // the context was probably already configured by default configuration
        // rules
        lc.reset();
        configurator.doConfigure(getClass().getResource("logback.xml"));

        AsyncCoalescingStatisticsAppender appender = (AsyncCoalescingStatisticsAppender)
            lc.getLogger(StopWatch.DEFAULT_LOGGER_NAME).getAppender("coalescingStatistics");

        //log from a bunch of threads
View Full Code Here


        JoranConfigurator configurator = new JoranConfigurator();
        configurator.setContext(lc);
        // the context was probably already configured by default configuration
        // rules
        lc.reset();
        configurator.doConfigure(getClass().getResource("logbackWCsv.xml"));

        Logger logger = lc.getLogger("org.perf4j.CsvAppenderTest");

        for (int i = 0; i < 20; i++) {
            StopWatch stopWatch = new Slf4JStopWatch(logger);
View Full Code Here

        // the context was probably already configured by default configuration
        // rules
        lc.reset();

        configurator.doConfigure(getClass().getResource("logback.xml"));

        ListAppender<LoggingEvent> listAppender = (ListAppender<LoggingEvent>) lc
                .getLogger(StopWatch.DEFAULT_LOGGER_NAME).getAppender(
                        "listAppender");
View Full Code Here

        JoranConfigurator configurator = new JoranConfigurator();
        configurator.setContext(lc);
        // the context was probably already configured by default configuration
        // rules
        lc.reset();
        configurator.doConfigure(getClass().getResource("logbackWJmx.xml"));

        MBeanServer server = ManagementFactory.getPlatformMBeanServer();
        ObjectName statisticsMBeanName = new ObjectName(StatisticsExposingMBean.DEFAULT_MBEAN_NAME);

        //add a notification listener so we can check for notifications
View Full Code Here

//    addStatusListener(statusListenerAsList);

    try {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(loggerContext);
      configurator.doConfigure(in);
//      addInfo("Context: " + loggerContext.getName() + " reloaded.");
    } finally {
//      removeStatusListener(statusListenerAsList);
//      if (debug) {
//        StatusPrinter.print(statusListenerAsList.getStatusList());
View Full Code Here

      configurator.setContext(context);
      context.putProperty("WORKER_NAME", workerName);
      context.putProperty("LOG_DIRECTORY", logDirectory);

      try {
        configurator.doConfigure(GrinderProcess.class.getResource("/logback-worker.xml"));
      } catch (final JoranException e) {
        throw new EngineException("Could not initialise logger", e);
      }

      return result;
View Full Code Here

        configurator.setContext(ctx);
       
        ctx.reset();
        ctx.putProperty("rmc.logfile", path.toString()); //$NON-NLS-1$
       
        configurator.doConfigure(getClass().getResourceAsStream("/logback.xml")); //$NON-NLS-1$
      } catch (JoranException e) {
        ILogService logService = LogServiceImpl.getInstance(RedmineCommonPlugin.getDefault().getBundle(), LogWriter.class);
        logService.error(e, "Logback configuration failed"); //$NON-NLS-1$
      }
    }
View Full Code Here

            // 初始化Logback
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            JoranConfigurator configurator = new JoranConfigurator();
            configurator.setContext(lc);
            lc.reset();
            configurator.doConfigure(filtersrvConfig.getRocketmqHome() + "/conf/logback_filtersrv.xml");
            log = LoggerFactory.getLogger(LoggerName.FiltersrvLoggerName);

            // 初始化服务控制对象
            final FiltersrvController controller =
                    new FiltersrvController(filtersrvConfig, nettyServerConfig);
View Full Code Here

            // 初始化Logback
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            JoranConfigurator configurator = new JoranConfigurator();
            configurator.setContext(lc);
            lc.reset();
            configurator.doConfigure(brokerConfig.getRocketmqHome() + "/conf/logback_broker.xml");
            final Logger log = LoggerFactory.getLogger(LoggerName.BrokerLoggerName);

            // 打印启动参数
            MixAll.printObjectProperties(log, brokerConfig);
            MixAll.printObjectProperties(log, nettyServerConfig);
View Full Code Here

            // 初始化Logback
            LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
            JoranConfigurator configurator = new JoranConfigurator();
            configurator.setContext(lc);
            lc.reset();
            configurator.doConfigure(brokerConfig.getRocketmqHome() + "/conf/logback_broker.xml");
            final Logger log = LoggerFactory.getLogger(LoggerName.BrokerLoggerName);

            // 打印启动参数
            MixAll.printObjectProperties(log, brokerConfig);
            MixAll.printObjectProperties(log, nettyServerConfig);
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.