org.apache.log4j.Hierarchy.getCurrentLoggers()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(156)

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

Hierarchy.getCurrentLoggers介绍

[英]Returns all the currently defined categories in this hierarchy as an java.util.Enumeration.

The root logger is not included in the returned Enumeration.
[中]以java格式返回此层次结构中当前定义的所有类别。util。枚举。
返回的枚举中包括根记录器。

代码示例

代码示例来源:origin: log4j/log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: log4j/log4j

Enumeration cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();
 cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

代码示例来源:origin: log4j/log4j

Enumeration cats = getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

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

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: apache/log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

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

Enumeration cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();
 cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

代码示例来源:origin: apache/log4j

Enumeration cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();
 cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

代码示例来源:origin: apache/log4j

Enumeration cats = getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

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

/**
  Reset all values contained in this hierarchy instance to their
  default.  This removes all appenders from all categories, sets
  the level of all non-root categories to <code>null</code>,
  sets their additivity flag to <code>true</code> and sets the level
  of the root logger to {@link Level#DEBUG DEBUG}.  Moreover,
  message disabling is set its default "off" value.
  <p>Existing categories are not removed. They are just reset.
  <p>This method should be used sparingly and with care as it will
  block all logging until it is completed.</p>
  @since 0.8.5 */
public
void resetConfiguration() {
 getRootLogger().setLevel((Level) Level.DEBUG);
 root.setResourceBundle(null);
 setThreshold(Level.ALL);
 // the synchronization is needed to prevent JDK 1.2.x hashtable
 // surprises
 synchronized(ht) {
  shutdown(); // nested locks are OK
  Enumeration cats = getCurrentLoggers();
  while(cats.hasMoreElements()) {
 Logger c = (Logger) cats.nextElement();
 c.setLevel(null);
 c.setAdditivity(true);
 c.setResourceBundle(null);
  }
 }
 rendererMap.clear();
}

代码示例来源:origin: org.apache.activemq/activemq-all

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: org.apache.log4j/com.springsource.org.apache.log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: org.apache/log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: apache-log4j/log4j

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: org.jboss.logmanager/log4j-jboss-logmanager

@Override
public Enumeration getCurrentCategories() {
  return getCurrentLoggers();
}

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

/**
  @deprecated Please use {@link #getCurrentLoggers} instead.
 */
public
Enumeration getCurrentCategories() {
 return getCurrentLoggers();
}

代码示例来源:origin: org.apache.activemq/activemq-all

Enumeration cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();
 cats = this.getCurrentLoggers();
 while(cats.hasMoreElements()) {
Logger c = (Logger) cats.nextElement();

代码示例来源:origin: apache-log4j/log4j

/**
  Reset all values contained in this hierarchy instance to their
  default.  This removes all appenders from all categories, sets
  the level of all non-root categories to <code>null</code>,
  sets their additivity flag to <code>true</code> and sets the level
  of the root logger to {@link Level#DEBUG DEBUG}.  Moreover,
  message disabling is set its default "off" value.
  <p>Existing categories are not removed. They are just reset.
  <p>This method should be used sparingly and with care as it will
  block all logging until it is completed.</p>
  @since 0.8.5 */
public
void resetConfiguration() {
 getRootLogger().setLevel((Level) Level.DEBUG);
 root.setResourceBundle(null);
 setThreshold(Level.ALL);
 // the synchronization is needed to prevent JDK 1.2.x hashtable
 // surprises
 synchronized(ht) {
  shutdown(); // nested locks are OK
  Enumeration cats = getCurrentLoggers();
  while(cats.hasMoreElements()) {
 Logger c = (Logger) cats.nextElement();
 c.setLevel(null);
 c.setAdditivity(true);
 c.setResourceBundle(null);
  }
 }
 rendererMap.clear();
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.log4j

/**
  Reset all values contained in this hierarchy instance to their
  default.  This removes all appenders from all categories, sets
  the level of all non-root categories to <code>null</code>,
  sets their additivity flag to <code>true</code> and sets the level
  of the root logger to {@link Level#DEBUG DEBUG}.  Moreover,
  message disabling is set its default "off" value.
  <p>Existing categories are not removed. They are just reset.
  <p>This method should be used sparingly and with care as it will
  block all logging until it is completed.</p>
  @since 0.8.5 */
public
void resetConfiguration() {
 getRootLogger().setLevel((Level) Level.DEBUG);
 root.setResourceBundle(null);
 setThreshold(Level.ALL);
 // the synchronization is needed to prevent JDK 1.2.x hashtable
 // surprises
 synchronized(ht) {
  shutdown(); // nested locks are OK
  Enumeration cats = getCurrentLoggers();
  while(cats.hasMoreElements()) {
 Logger c = (Logger) cats.nextElement();
 c.setLevel(null);
 c.setAdditivity(true);
 c.setResourceBundle(null);
  }
 }
 rendererMap.clear();
}

代码示例来源:origin: org.apache/log4j

/**
  Reset all values contained in this hierarchy instance to their
  default.  This removes all appenders from all categories, sets
  the level of all non-root categories to <code>null</code>,
  sets their additivity flag to <code>true</code> and sets the level
  of the root logger to {@link Level#DEBUG DEBUG}.  Moreover,
  message disabling is set its default "off" value.
  <p>Existing categories are not removed. They are just reset.
  <p>This method should be used sparingly and with care as it will
  block all logging until it is completed.</p>
  @since 0.8.5 */
public
void resetConfiguration() {
 getRootLogger().setLevel((Level) Level.DEBUG);
 root.setResourceBundle(null);
 setThreshold(Level.ALL);
 // the synchronization is needed to prevent JDK 1.2.x hashtable
 // surprises
 synchronized(ht) {
  shutdown(); // nested locks are OK
  Enumeration cats = getCurrentLoggers();
  while(cats.hasMoreElements()) {
 Logger c = (Logger) cats.nextElement();
 c.setLevel(null);
 c.setAdditivity(true);
 c.setResourceBundle(null);
  }
 }
 rendererMap.clear();
}

相关文章