Log class

The Log Facade.

Provides static access to the logging system. Supports all RFC 5424 levels.

Log.info('User logged in', {'id': userId});
Log.error('Payment failed', {'error': e.toString()});

Constructors

Log()

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 Methods

alert(String message, [dynamic context]) → void
Action must be taken immediately.
channel(String name) LoggerDriver
Get a specific channel.
critical(String message, [dynamic context]) → void
Critical conditions.
debug(String message, [dynamic context]) → void
Detailed debug information.
emergency(String message, [dynamic context]) → void
System is unusable.
error(String message, [dynamic context]) → void
Runtime errors that do not require immediate action.
fake() FakeLogManager
Replace the bound LogManager with a FakeLogManager for testing.
info(String message, [dynamic context]) → void
Interesting events.
log(String level, String message, [dynamic context]) → void
Log a message at a given level.
notice(String message, [dynamic context]) → void
Normal but significant events.
unfake() → void
Restore the real LogManager binding, removing the fake.
warning(String message, [dynamic context]) → void
Exceptional occurrences that are not errors.