Log class

Global entry point for logging.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

minLevel → LogLevel
The lowest level that will reach any sink.
no setter
sink → LogSink
The sink currently receiving records (composite if + was used).
no setter

Static Methods

captureCrashes() → void
Routes FlutterError.onError, PlatformDispatcher's onError, and isolate errors through e. Invoked by configure by default.
configure({LogLevel? minLevel, LogSink? sink, VoidCallback captureCrashes = Log.captureCrashes}) → void
Configures the global logger.
d(Object message, {Map<String, Object?>? fields}) → void
Logs at LogLevel.debug.
e(Object message, {Map<String, Object?>? fields, Object? error, StackTrace? stackTrace}) → void
Logs at LogLevel.error.
f(Object message, {Map<String, Object?>? fields, Object? error, StackTrace? stackTrace}) → void
Logs at LogLevel.fatal.
flush() → Future<void>
Awaits pending delivery on the active sink. Call before exiting the isolate or after logging a fatal error that may terminate the app.
i(Object message, {Map<String, Object?>? fields}) → void
Logs at LogLevel.info.
t(Object message, {Map<String, Object?>? fields}) → void
Logs at LogLevel.trace.
tag(String name) → Logger
Returns a scoped Logger that tags every record with name.
w(Object message, {Map<String, Object?>? fields, Object? error, StackTrace? stackTrace}) → void
Logs at LogLevel.warn.