Logger class Null safety

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
hashCode int
The hash code for this object. [...]
read-only, inherited
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
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clearListeners() → void
config(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.CONFIG. [...]
fine(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.FINE. [...]
finer(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.FINER. [...]
finest(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.FINEST. [...]
info(Object? 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, Object? message, [Object? error, StackTrace? stackTrace, Zone? zone]) → void
Adds a log record for a message at a particular logLevel if isLoggable(logLevel) is true. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
severe(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.SEVERE. [...]
shout(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.SHOUT. [...]
toString() String
A string representation of this object. [...]
inherited
warning(Object? message, [Object? error, StackTrace? stackTrace]) → void
Log message at level Level.WARNING. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

root Logger
Top-level root Logger.
final