@BeforeClass public static void setupClass() { try { Class.forName("java.io.ObjectInputFilter"); useObjectInputStream = true; } catch (ClassNotFoundException ex) { // Ignore the exception } ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(configFactory); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ThreadContext.clearAll(); ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { ThreadContext.clearAll(); ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@BeforeClass public static void setupClass() { StatusLogger.getLogger().setLevel(Level.OFF); ConfigurationFactory.setConfigurationFactory(cf); final LoggerContext ctx = LoggerContext.getContext(); ctx.reconfigure(); }
@Override public synchronized ILogger init(ILog owner, String loggerName) throws Exception { if (!__inited) { __owner = owner; __loggerName = loggerName; // if (!__logInited) { ConfigurationSource _source = new ConfigurationSource(new FileInputStream(__owner.getModuleCfg().getConfigFile())); Configurator.initialize(null, _source); final Configuration _config = new DefaultConfiguration(); ConfigurationFactory.setConfigurationFactory(new XmlConfigurationFactory() { @Override public Configuration getConfiguration(ConfigurationSource source) { return _config; } }); ConfigurationFactory.getInstance().getConfiguration(_source); __logInited = true; } __logger = LogManager.getLogger(StringUtils.defaultIfBlank(loggerName, __owner.getModuleCfg().getLoggerName())); __inited = true; } return this; }
public static void main(String[] args) { try { final String nodeId = ConfigUtils.getOptionValue(args, NCConfig.Option.NODE_ID); final ConfigManager configManager = new ConfigManager(args); INCApplication application = getApplication(args); application.registerConfig(configManager); NCConfig ncConfig = new NCConfig(nodeId, configManager); LoggerContext ctx = (LoggerContext) LogManager.getContext(false); Configuration cfg = ctx.getConfiguration(); NCLogConfigurationFactory logCfgFactory = new NCLogConfigurationFactory(ncConfig); ConfigurationFactory.setConfigurationFactory(logCfgFactory); configManager.processConfig(); cfg.removeLogger("Console"); ctx.start(logCfgFactory.getConfiguration(ctx, ConfigurationSource.NULL_SOURCE)); final NodeControllerService ncService = new NodeControllerService(ncConfig, application); ncService.start(); while (true) { Thread.sleep(10000); } } catch (CmdLineException e) { LOGGER.log(Level.DEBUG, "Exception parsing command line: " + Arrays.toString(args), e); System.exit(2); } catch (Exception e) { LOGGER.error("Exiting NCDriver due to exception", e); System.exit(1); } }
public static void main(String[] args) throws Exception { try { final ConfigManager configManager = new ConfigManager(args); ICCApplication application = getApplication(args); application.registerConfig(configManager); CCConfig ccConfig = new CCConfig(configManager); LoggerContext ctx = (LoggerContext) LogManager.getContext(false); Configuration cfg = ctx.getConfiguration(); CCLogConfigurationFactory logCfgFactory = new CCLogConfigurationFactory(ccConfig); ConfigurationFactory.setConfigurationFactory(logCfgFactory); cfg.removeLogger("Console"); configManager.processConfig(); ctx.start(logCfgFactory.getConfiguration(ctx, ConfigurationSource.NULL_SOURCE)); ClusterControllerService ccService = new ClusterControllerService(ccConfig, application); ccService.start(); while (true) { Thread.sleep(100000); } } catch (CmdLineException e) { LOGGER.log(Level.DEBUG, "Exception parsing command line: " + Arrays.toString(args), e); System.exit(2); } catch (Exception e) { LOGGER.log(Level.ERROR, "Exiting CCDriver due to exception", e); System.exit(1); } }