ch.qos.logback.core.spi.LifeCycle.start()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中ch.qos.logback.core.spi.LifeCycle.start()方法的一些代码示例,展示了LifeCycle.start()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LifeCycle.start()方法的具体详情如下:
包路径:ch.qos.logback.core.spi.LifeCycle
类名称:LifeCycle
方法名:start

LifeCycle.start介绍

暂无

代码示例

代码示例来源:origin: org.springframework.boot/spring-boot

public void start(LifeCycle lifeCycle) {
  if (lifeCycle instanceof ContextAware) {
    ((ContextAware) lifeCycle).setContext(this.context);
  }
  lifeCycle.start();
}

代码示例来源:origin: ch.qos.logback/logback-classic

@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();
  }
}

代码示例来源:origin: camunda/camunda-bpm-platform

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);
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

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();
  }
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
  * 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();
  }
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

@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();
 }
}

代码示例来源:origin: camunda/camunda-bpm-platform

((LifeCycle) evaluator).start();
addInfo("Starting evaluator named [" + evaluator.getName() + "]");

代码示例来源:origin: camunda/camunda-bpm-platform

definer.setContext(context);
if(definer instanceof LifeCycle) {
 ((LifeCycle) definer).start();

代码示例来源:origin: camunda/camunda-bpm-platform

if (nestedComplexProperty instanceof LifeCycle
  && NoAutoStartUtil.notMarkedWithNoAutoStart(nestedComplexProperty)) {
 ((LifeCycle) nestedComplexProperty).start();

代码示例来源:origin: org.antframework.boot/ant-boot-starter-log

public void start(LifeCycle lifeCycle) {
  if (lifeCycle instanceof ContextAware) {
    ((ContextAware) lifeCycle).setContext(this.context);
  }
  lifeCycle.start();
}

代码示例来源:origin: tony19/logback-android

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
  }
 }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

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
    }
  }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

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
    }
  }
}

代码示例来源:origin: Nextdoor/bender

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
    }
  }
}

代码示例来源:origin: ch.qos.logback/core

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();
  }
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

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();
  }
 }
}

代码示例来源:origin: tony19/logback-android

public void end(InterpretationContext ec, String e) {
 if (inError) {
  return;
 }
 if (isEffectivelyAdded() && 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();
 }
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public void end(InterpretationContext ec, String e) {
  if (inError) {
    return;
  }
  if (isEffectivelyAdded() && 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();
  }
}

代码示例来源:origin: Nextdoor/bender

public void end(InterpretationContext ec, String e) {
  if (inError) {
    return;
  }
  if (isEffectivelyAdded() && 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();
  }
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public void end(InterpretationContext ec, String e) {
  if (inError) {
    return;
  }
  if (isEffectivelyAdded() && 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();
  }
}

相关文章