Logger class

A class for logging messages to the console. All methods use stderr for output by default to avoid conflicts with stdout.

Constructors

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

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 Methods

error(String message, {bool error = true, int? exitCode}) String
Logs an error message in red. If error is true, the message will be output to stderr. If exitCode is not null, the process will exit with the given exit code.
info(String message, {bool error = true}) String
Logs an informational message in blue.
log(String message, {bool error = true}) String
Logs a message with the prefix 'LOG'.
success(String message, {bool error = true}) String
Logs a success message in green.
tip(String message, {bool error = true}) String
Logs a tip message in green.
warning(String message, {bool error = true}) String
Logs a warning message in yellow.