当前位置: 首页>>代码示例>>Java>>正文


Java LoggerContextListener类代码示例

本文整理汇总了Java中ch.qos.logback.classic.spi.LoggerContextListener的典型用法代码示例。如果您正苦于以下问题:Java LoggerContextListener类的具体用法?Java LoggerContextListener怎么用?Java LoggerContextListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LoggerContextListener类属于ch.qos.logback.classic.spi包,在下文中一共展示了LoggerContextListener类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: resetListenersExceptResetResistant

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private void resetListenersExceptResetResistant() {
    ArrayList toRetain = new ArrayList();
    Iterator i$ = this.loggerContextListenerList.iterator();

    while(i$.hasNext()) {
        LoggerContextListener lcl = (LoggerContextListener)i$.next();
        if(lcl.isResetResistant()) {
            toRetain.add(lcl);
        }
    }

    this.loggerContextListenerList.retainAll(toRetain);
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:14,代码来源:KonkerLoggerContext.java

示例2: previouslyRegisteredListenerWithSameObjectName

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private boolean previouslyRegisteredListenerWithSameObjectName() {
  List<LoggerContextListener> lcll = loggerContext.getCopyOfListenerList();
  for (LoggerContextListener lcl : lcll) {
    if (lcl instanceof JMXConfigurator) {
      JMXConfigurator jmxConfigurator = (JMXConfigurator) lcl;
      if (objectName.equals(jmxConfigurator.objectName)) {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:13,代码来源:JMXConfigurator.java

示例3: begin

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
@Override
public void begin(InterpretationContext ec, String name, Attributes attributes)
        throws ActionException {

  inError = false;

  String className = attributes.getValue(CLASS_ATTRIBUTE);
  if (OptionHelper.isEmpty(className)) {
    addError("Mandatory \"" + CLASS_ATTRIBUTE
            + "\" attribute not set for <loggerContextListener> element");
    inError = true;
    return;
  }

  try {
    lcl = (LoggerContextListener) OptionHelper.instantiateByClassName(
            className, LoggerContextListener.class, context);

    if(lcl instanceof ContextAware) {
      ((ContextAware) lcl).setContext(context);
    }

    ec.pushObject(lcl);
    addInfo("Adding LoggerContextListener of type [" + className
            + "] to the object stack");

  } catch (Exception oops) {
    inError = true;
    addError("Could not create LoggerContextListener of type " + className + "].", oops);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:32,代码来源:LoggerContextListenerAction.java

示例4: resetListenersExceptResetResistant

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private void resetListenersExceptResetResistant() {
  List<LoggerContextListener> toRetain = new ArrayList<LoggerContextListener>();

  for (LoggerContextListener lcl : loggerContextListenerList) {
    if (lcl.isResetResistant()) {
      toRetain.add(lcl);
    }
  }
  loggerContextListenerList.retainAll(toRetain);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:11,代码来源:LoggerContext.java

示例5: getCopyOfListenerList

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
public List<LoggerContextListener> getCopyOfListenerList() {
    return new ArrayList(this.loggerContextListenerList);
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:4,代码来源:KonkerLoggerContext.java

示例6: addListener

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
public void addListener(LoggerContextListener listener) {
  loggerContextListenerList.add(listener);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:4,代码来源:LoggerContext.java

示例7: removeListener

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
public void removeListener(LoggerContextListener listener) {
  loggerContextListenerList.remove(listener);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:4,代码来源:LoggerContext.java

示例8: getCopyOfListenerList

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
public List<LoggerContextListener> getCopyOfListenerList() {
  return new ArrayList<LoggerContextListener>(loggerContextListenerList);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:4,代码来源:LoggerContext.java

示例9: fireOnLevelChange

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
void fireOnLevelChange(Logger logger, Level level) {
  for (LoggerContextListener listener : loggerContextListenerList) {
    listener.onLevelChange(logger, level);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:6,代码来源:LoggerContext.java

示例10: fireOnReset

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private void fireOnReset() {
  for (LoggerContextListener listener : loggerContextListenerList) {
    listener.onReset(this);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:6,代码来源:LoggerContext.java

示例11: fireOnStart

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private void fireOnStart() {
  for (LoggerContextListener listener : loggerContextListenerList) {
    listener.onStart(this);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:6,代码来源:LoggerContext.java

示例12: fireOnStop

import ch.qos.logback.classic.spi.LoggerContextListener; //导入依赖的package包/类
private void fireOnStop() {
  for (LoggerContextListener listener : loggerContextListenerList) {
    listener.onStop(this);
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:6,代码来源:LoggerContext.java


注:本文中的ch.qos.logback.classic.spi.LoggerContextListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。