Logger class
Use a Logger to log debug messages.
Loggers are named using a hierarchical dot-separated name convention.
Constructors
- Logger(String name)
-
Create or find a Logger by 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.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- level ↔ Level
-
Effective level considering the levels established in this logger's
parents (when hierarchicalLoggingEnabled is true).
getter/setter pair
- name → String
-
Simple name of this logger.
final
-
onLevelChanged
→ Stream<
Level?> -
Returns a stream of level values set to this Logger.
no setter
-
onRecord
→ Stream<
LogRecord> -
Returns a stream of messages added to this Logger.
no setter
- parent → Logger?
-
Parent of this logger in the hierarchy of loggers.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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 particularlogLevel
ifisLoggable(logLevel)
is true. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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