Logger class

Properties

debugMode ↔ bool
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isOpen → bool
no setter
isSpinning → bool
no setter
levels ↔ Set<String>?
getter/setter pair
onLog ↔ void Function(String message, String asciiMessage)?
getter/setter pair
path → String?
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showTimestampInOutput ↔ bool
getter/setter pair
TAG_WIDTH ↔ int
getter/setter pair
verbose ↔ bool
Whether dev and debug messages are shown in the terminal.
getter/setter pair

Methods

add(DateTime now, String level, String message) → void
getString(dynamic message, Level level) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startSpinner(String label, {Level level = Level.log, Duration interval = const Duration(milliseconds: 300)}) → void
Shows an animated spinner on the current line until stopSpinner. Starting a new one replaces any spinner already running.
stopSpinner([String? message, Level level = Level.pass]) → void
Stops the spinner and prints message (or the spinner's label) at level.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance → Logger
final

Static Methods

close() → Future<void>
Stops saving to the file. The instance stays usable (console only).
flush() → Future<void>
getStamp(Level level) → String
Width of the longest level name (TRACE / DEBUG), so every tag lines up.
getTimestamp() → String
getVerbosityColour(Level level, String data) → String
open(String path, {bool append = true, Duration flushInterval = const Duration(seconds: 2), int flushThreshold = 16 * 1024, int maxBytes = 5 * 1024 * 1024, Set<String>? levels, void onLog(String message, String asciiMessage)?, bool debugMode = true}) → Future<Logger>
print(String message, Level verbosity) → void
strip(String s) → String