Google is committed to advancing racial equity for Black communities. See how.

level property

Level level

Effective level considering the levels established in this logger's parents (when hierarchicalLoggingEnabled is true).

Implementation

Level get level {
  Level effectiveLevel;

  if (parent == null) {
    // We're either the root logger or a detached logger.  Return our own
    // level.
    effectiveLevel = _level;
  } else if (!hierarchicalLoggingEnabled) {
    effectiveLevel = root._level;
  } else {
    effectiveLevel = _level ?? parent.level;
  }

  assert(effectiveLevel != null);
  return effectiveLevel;
}

level= (Level value)

Override the level for this particular Logger and its children.

Implementation

set level(Level value) {
  if (!hierarchicalLoggingEnabled && parent != null) {
    throw UnsupportedError(
        'Please set "hierarchicalLoggingEnabled" to true if you want to '
        'change the level on a non-root logger.');
  }
  _level = value;
}