Logger class

Use a Logger to log debug messages.

Loggers are named using a hierarchical dot-separated name convention.

Constructors

Logger(String name)
Singleton constructor. Calling new Logger(name) will return the same actual instance whenever it is called with the same string name.
factory
Logger.detached(String name)
Creates a new detached Logger. [...]
factory

Properties

children → Map<String, Logger>
Children in the hierarchy of loggers, indexed by their simple names.
final
fullName → String
The full name of this logger, which includes the parent's full name.
read-only
level Level
Effective level considering the levels established in this logger's parents (when hierarchicalLoggingEnabled is true).
read / write
name → String
Simple name of this logger.
final
onRecord → Stream<LogRecord>
Returns a stream of messages added to this Logger. [...]
read-only
parent Logger
Parent of this logger in the hierarchy of loggers.
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clearListeners() → void
config(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.CONFIG.
fine(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.FINE.
finer(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.FINER.
finest(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.FINEST.
info(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.INFO.
isLoggable(Level value) → bool
Whether a message for value's level is loggable in this logger.
log(Level logLevel, dynamic message, [ Object error, StackTrace stackTrace, Zone zone ]) → void
Adds a log record for a message at a particular logLevel if isLoggable(logLevel) is true. [...]
severe(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.SEVERE.
shout(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.SHOUT.
warning(dynamic message, [ Object error, StackTrace stackTrace ]) → void
Log message at level Level.WARNING.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

root Logger
Top-level root Logger.
final