Logger class
A singleton implementation of LogAdapter using the logging
package.
This logger forwards messages to the root logger and listens to log records. It supports multiple log levels and optional tagging and location tracking.
Use Logger() to access the shared instance.
- Implemented types
Constructors
- Logger.new()
-
Returns the singleton instance of Logger.
factory
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
-
debug(
String message, {String tag = defaultTag, bool loc = false}) → void -
Log a message at the debug level.
Internally mapped to
Level.FINE
in thelogging
package.override -
error(
String message, {String tag = defaultTag, bool loc = false}) → void -
Log a message at the error level.
Internally mapped to
Level.SEVERE
in thelogging
package.override -
info(
String message, {String tag = defaultTag, bool loc = false}) → void -
Log a message at the info level.
Internally mapped to
Level.INFO
in thelogging
package.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
warn(
String message, {String tag = defaultTag, bool loc = false}) → void -
Log a message at the warn level.
Internally mapped to
Level.WARNING
in thelogging
package.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited