Logger class

Use instances of logger to send log messages to the LogPrinter.

Constructors

Logger({LogFilter? filter, LogPrinter? printer, LogOutput? output, Level? level})
Create a new instance of Logger.

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

close() → void
Closes the logger and releases all resources.
d(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.debug.
e(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.error.
i(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.info.
isClosed() bool
log(Level level, dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message with level.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
v(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.verbose.
w(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.warning.
wtf(dynamic message, [dynamic error, StackTrace? stackTrace]) → void
Log a message at level Level.wtf.

Operators

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

Static Properties

level Level
The current logging level of the app.
getter/setter pair

Static Methods

addLogListener(LogCallback callback) → void
Register a LogCallback which is called for each new LogEvent.
addOutputListener(OutputCallback callback) → void
Register an OutputCallback which is called for each new OutputEvent.
removeLogListener(LogCallback callback) bool
Removes a LogCallback which was previously registered.
removeOutputListener(OutputCallback callback) → void
Removes a OutputCallback which was previously registered.