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

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

childrenMap<String, Logger>

Children in the hierarchy of loggers, indexed by their simple names.
final

fullNameString

The full name of this logger, which includes the parent's full name.
read-only

hashCodeint

The hash code for this object. ...
read-only, inherited

levelLevel

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

nameString

Simple name of this logger.
final

onRecordStream<LogRecord>

Returns a stream of messages added to this Logger. ...
read-only

parentLogger

Parent of this logger in the hierarchy of loggers.
final

runtimeTypeType

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. ...

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed. ...
inherited

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.

toString() String

Returns a string representation of this object.
inherited

warning(dynamic message, [Object error, StackTrace stackTrace]) void

Log message at level Level.WARNING.

Operators

operator ==(Object other) bool

The equality operator. ...
inherited

Static Properties

rootLogger

Top-level root Logger.
final