Logger class
Use a Logger to log debug messages.
Copied, adapted and simplified from the logging package
(https://github.com/dart-lang/logging).
Constructors
- Logger(String name)
-
Singleton constructor. Calling
new Logger(name)
will return the same actual instance whenever it is called with the same string name.factory - Logger.detached(String name)
-
Creates a new detached Logger.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- level ↔ LogLevel
-
Returns the level set for this logger. If the level is not set,
it will return the defaultLogLevel for the system.
getter/setter pair
- name → String
-
Simple name of this logger.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
config(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.CONFIG.
-
fine(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.FINE.
-
finer(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.FINER.
-
finest(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.FINEST.
-
info(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.INFO.
-
isLoggable(
LogLevel value) → bool -
Whether a message for
value
's level is loggable in this logger. -
log(
LogLevel logLevel, dynamic message, [Object? error, StackTrace? stackTrace]) → void -
Adds a log entry 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(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.SEVERE.
-
shout(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.SHOUT.
-
toString(
) → String -
A string representation of this object.
inherited
-
warning(
dynamic message, [Object? error, StackTrace? stackTrace]) → void - Log message at level LogLevel.WARNING.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited