ch.qos.logback.classic.Logger.isRootLogger()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(203)

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

Logger.isRootLogger介绍

暂无

代码示例

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

private void localLevelReset() {
  effectiveLevelInt = Level.DEBUG_INT;
  if (isRootLogger()) {
    level = Level.DEBUG;
  } else {
    level = null;
  }
}

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

public synchronized void setLevel(Level newLevel) {
  if (level == newLevel) {
    // nothing to do;
    return;
  }
  if (newLevel == null && isRootLogger()) {
    throw new IllegalArgumentException("The level of the root logger cannot be set to null");
  }
  level = newLevel;
  if (newLevel == null) {
    effectiveLevelInt = parent.effectiveLevelInt;
    newLevel = parent.getEffectiveLevel();
  } else {
    effectiveLevelInt = newLevel.levelInt;
  }
  if (childrenList != null) {
    int len = childrenList.size();
    for (int i = 0; i < len; i++) {
      Logger child = (Logger) childrenList.get(i);
      // tell child to handle parent levelInt change
      child.handleParentLevelChange(effectiveLevelInt);
    }
  }
  // inform listeners
  loggerContext.fireOnLevelChange(this, newLevel);
}

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

if (this.isRootLogger()) {
  childLogger = new Logger(lastPart, this, this.loggerContext);
} else {

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

private void localLevelReset() {
 effectiveLevelInt = Level.DEBUG_INT;
 if (isRootLogger()) {
  level = Level.DEBUG;
 } else {
  level = null;
 }
}

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

public synchronized void setLevel(Level newLevel) {
 if (level == newLevel) {
  // nothing to do;
  return;
 }
 if (newLevel == null && isRootLogger()) {
  throw new IllegalArgumentException(
    "The level of the root logger cannot be set to null");
 }
 level = newLevel;
 if (newLevel == null) {
  effectiveLevelInt = parent.effectiveLevelInt;
  newLevel = parent.getEffectiveLevel();
 } else {
  effectiveLevelInt = newLevel.levelInt;
 }
 if (childrenList != null) {
  int len = childrenList.size();
  for (int i = 0; i < len; i++) {
   Logger child = (Logger) childrenList.get(i);
   // tell child to handle parent levelInt change
   child.handleParentLevelChange(effectiveLevelInt);
  }
 }
 // inform listeners
 loggerContext.fireOnLevelChange(this, newLevel);
}

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

if (this.isRootLogger()) {
 childLogger = new Logger(lastPart, this, this.loggerContext);
} else {

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

private void localLevelReset() {
 effectiveLevelInt = Level.DEBUG_INT;
 if (isRootLogger()) {
  level = Level.DEBUG;
 } else {
  level = null;
 }
}

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

private void localLevelReset() {
 effectiveLevelInt = Level.DEBUG_INT;
 if (isRootLogger()) {
  level = Level.DEBUG;
 } else {
  level = null;
 }
}

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

private void localLevelReset() {
  effectiveLevelInt = Level.DEBUG_INT;
  if (isRootLogger()) {
    level = Level.DEBUG;
  } else {
    level = null;
  }
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

private void localLevelReset() {
 effectiveLevelInt = Level.DEBUG_INT;
 if(isRootLogger()) {
  level = Level.DEBUG;
 } else {
  level = null;
 }
}

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

private void localLevelReset() {
  effectiveLevelInt = Level.DEBUG_INT;
  if (isRootLogger()) {
    level = Level.DEBUG;
  } else {
    level = null;
  }
}

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

private void localLevelReset() {
  effectiveLevelInt = Level.DEBUG_INT;
  if (isRootLogger()) {
    level = Level.DEBUG;
  } else {
    level = null;
  }
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

public synchronized void setLevel(Level newLevel) {
 if (level == newLevel) {
  // nothing to do;
  return;
 }
 if(newLevel == null && isRootLogger()) {
  throw new IllegalArgumentException("The level of the root logger cannot be set to null");
 }
   
 level = newLevel;
 if (newLevel == null) {
  effectiveLevelInt = parent.effectiveLevelInt;
 } else {
  effectiveLevelInt = newLevel.levelInt;
 }
 
 if (childrenList != null) {
  int len = childrenList.size();
  for (int i = 0; i < len; i++) {
   Logger child = (Logger) childrenList.get(i);
   // tell child to handle parent levelInt change
   child.handleParentLevelChange(effectiveLevelInt);
  }
 }
}

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

public synchronized void setLevel(Level newLevel) {
 if (level == newLevel) {
  // nothing to do;
  return;
 }
 if (newLevel == null && isRootLogger()) {
  throw new IllegalArgumentException(
    "The level of the root logger cannot be set to null");
 }
 level = newLevel;
 if (newLevel == null) {
  effectiveLevelInt = parent.effectiveLevelInt;
 } else {
  effectiveLevelInt = newLevel.levelInt;
 }
 if (childrenList != null) {
  int len = childrenList.size();
  for (int i = 0; i < len; i++) {
   Logger child = (Logger) childrenList.get(i);
   // tell child to handle parent levelInt change
   child.handleParentLevelChange(effectiveLevelInt);
  }
 }
 // inform listeners
 loggerContext.fireOnLevelChange(this, newLevel);
}

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

public synchronized void setLevel(Level newLevel) {
  if (level == newLevel) {
    // nothing to do;
    return;
  }
  if (newLevel == null && isRootLogger()) {
    throw new IllegalArgumentException("The level of the root logger cannot be set to null");
  }
  level = newLevel;
  if (newLevel == null) {
    effectiveLevelInt = parent.effectiveLevelInt;
    newLevel = parent.getEffectiveLevel();
  } else {
    effectiveLevelInt = newLevel.levelInt;
  }
  if (childrenList != null) {
    int len = childrenList.size();
    for (int i = 0; i < len; i++) {
      Logger child = (Logger) childrenList.get(i);
      // tell child to handle parent levelInt change
      child.handleParentLevelChange(effectiveLevelInt);
    }
  }
  // inform listeners
  loggerContext.fireOnLevelChange(this, newLevel);
}

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

public synchronized void setLevel(Level newLevel) {
 if (level == newLevel) {
  // nothing to do;
  return;
 }
 if (newLevel == null && isRootLogger()) {
  throw new IllegalArgumentException(
    "The level of the root logger cannot be set to null");
 }
 level = newLevel;
 if (newLevel == null) {
  effectiveLevelInt = parent.effectiveLevelInt;
  newLevel = parent.getEffectiveLevel();
 } else {
  effectiveLevelInt = newLevel.levelInt;
 }
 if (childrenList != null) {
  int len = childrenList.size();
  for (int i = 0; i < len; i++) {
   Logger child = (Logger) childrenList.get(i);
   // tell child to handle parent levelInt change
   child.handleParentLevelChange(effectiveLevelInt);
  }
 }
 // inform listeners
 loggerContext.fireOnLevelChange(this, newLevel);
}

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

public synchronized void setLevel(Level newLevel) {
  if (level == newLevel) {
    // nothing to do;
    return;
  }
  if (newLevel == null && isRootLogger()) {
    throw new IllegalArgumentException("The level of the root logger cannot be set to null");
  }
  level = newLevel;
  if (newLevel == null) {
    effectiveLevelInt = parent.effectiveLevelInt;
    newLevel = parent.getEffectiveLevel();
  } else {
    effectiveLevelInt = newLevel.levelInt;
  }
  if (childrenList != null) {
    int len = childrenList.size();
    for (int i = 0; i < len; i++) {
      Logger child = (Logger) childrenList.get(i);
      // tell child to handle parent levelInt change
      child.handleParentLevelChange(effectiveLevelInt);
    }
  }
  // inform listeners
  loggerContext.fireOnLevelChange(this, newLevel);
}

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

public synchronized void setLevel(Level newLevel) {
  if (level == newLevel) {
    // nothing to do;
    return;
  }
  if (newLevel == null && isRootLogger()) {
    throw new IllegalArgumentException("The level of the root logger cannot be set to null");
  }
  level = newLevel;
  if (newLevel == null) {
    effectiveLevelInt = parent.effectiveLevelInt;
    newLevel = parent.getEffectiveLevel();
  } else {
    effectiveLevelInt = newLevel.levelInt;
  }
  if (childrenList != null) {
    int len = childrenList.size();
    for (int i = 0; i < len; i++) {
      Logger child = (Logger) childrenList.get(i);
      // tell child to handle parent levelInt change
      child.handleParentLevelChange(effectiveLevelInt);
    }
  }
  // inform listeners
  loggerContext.fireOnLevelChange(this, newLevel);
}

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

if (this.isRootLogger()) {
  childLogger = new Logger(lastPart, this, this.loggerContext);
} else {

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

if (this.isRootLogger()) {
 childLogger = new Logger(lastPart, this, this.loggerContext);
} else {

相关文章