Logging class abstract

A singleton logging instance that provides some debug info. Disabled by default.

Usage

To enable logging, set useLogger to true. This initializes a default Logger instance using a PrefixPrinter for prefixed logs and a PrettyPrinter for formatted output.

Custom Logger

  • The Logger instance can be customized by directly assigning a new instance to log. Note that this should be done after enabling logging by setting useLogger to true, as enabling it sets a default Logger.

Constructors

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

log ↔ Logger?
The static Logger instance used for logging messages. If logging is disabled, this will be null.
getter/setter pair
useLogger bool
Returns true if logging is currently enabled; otherwise, returns false.
getter/setter pair