public void start(LifeCycle lifeCycle) { if (lifeCycle instanceof ContextAware) { ((ContextAware) lifeCycle).setContext(this.context); } lifeCycle.start(); }
@Override public void shutdown() { ((LifeCycle) LoggerFactory.getILoggerFactory()).stop(); }
@Override public void end(InterpretationContext ec, String name) throws ActionException { if (inError) { return; } Object o = ec.peekObject(); if (o != lcl) { addWarn("The object on the top the of the stack is not the LoggerContextListener pushed earlier."); } else { if (lcl instanceof LifeCycle) { ((LifeCycle) lcl).start(); addInfo("Starting LoggerContextListener"); } ((LoggerContext) context).addListener(lcl); ec.popObject(); } }
private static void initListener(LoggerContext loggerContext, StatusListener listener) { if (listener != null) { if(listener instanceof ContextAware) // LOGBACK-767 ((ContextAware) listener).setContext(loggerContext); if(listener instanceof LifeCycle) // LOGBACK-767 ((LifeCycle) listener).start(); loggerContext.getStatusManager().add(listener); } }
public void end(InterpretationContext ec, String e) { if (inError) { return; } if (statusListener instanceof LifeCycle) { ((LifeCycle) statusListener).start(); } Object o = ec.peekObject(); if (o != statusListener) { addWarn("The object at the of the stack is not the statusListener pushed earlier."); } else { ec.popObject(); } } }
/** * Once the children elements are also parsed, now is the time to activate the * appender options. */ public void end(InterpretationContext ec, String name) { if (inError) { return; } if (appender instanceof LifeCycle) { ((LifeCycle) appender).start(); } Object o = ec.peekObject(); if (o != appender) { addWarn("The object at the of the stack is not the appender named [" + appender.getName() + "] pushed earlier."); } else { ec.popObject(); } } }
@Override public void end(InterpretationContext ec, String name) throws ActionException { if (inError) { return; } Object o = ec.peekObject(); if (o != lcl) { addWarn("The object on the top the of the stack is not the LoggerContextListener pushed earlier."); } else { if (lcl instanceof LifeCycle) { ((LifeCycle) lcl).start(); addInfo("Starting LoggerContextListener"); } ((LoggerContext) context).addListener(lcl); ec.popObject(); } }
((LifeCycle) evaluator).start(); addInfo("Starting evaluator named [" + evaluator.getName() + "]");
definer.setContext(context); if(definer instanceof LifeCycle) { ((LifeCycle) definer).start();
if (nestedComplexProperty instanceof LifeCycle && NoAutoStartUtil.notMarkedWithNoAutoStart(nestedComplexProperty)) { ((LifeCycle) nestedComplexProperty).start();
public void start(LifeCycle lifeCycle) { if (lifeCycle instanceof ContextAware) { ((ContextAware) lifeCycle).setContext(this.context); } lifeCycle.start(); }
private static void initAndAddListener(Context context, StatusListener listener) { if (listener != null) { if (listener instanceof ContextAware) // LOGBACK-767 ((ContextAware) listener).setContext(context); boolean effectivelyAdded = context.getStatusManager().add(listener); if (effectivelyAdded && (listener instanceof LifeCycle)) { ((LifeCycle) listener).start(); // LOGBACK-767 } } }
private static void initAndAddListener(Context context, StatusListener listener) { if (listener != null) { if (listener instanceof ContextAware) // LOGBACK-767 ((ContextAware) listener).setContext(context); boolean effectivelyAdded = context.getStatusManager().add(listener); if (effectivelyAdded && (listener instanceof LifeCycle)) { ((LifeCycle) listener).start(); // LOGBACK-767 } } }
private static void initAndAddListener(Context context, StatusListener listener) { if (listener != null) { if (listener instanceof ContextAware) // LOGBACK-767 ((ContextAware) listener).setContext(context); boolean effectivelyAdded = context.getStatusManager().add(listener); if (effectivelyAdded && (listener instanceof LifeCycle)) { ((LifeCycle) listener).start(); // LOGBACK-767 } } }