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
messagein red. Iferroris true, the message will be output to stderr. IfexitCodeis not null, the process will exit with the given exit code. -
info(
String message, {bool error = true}) → String -
Logs an informational
messagein blue. -
log(
String message, {bool error = true}) → String -
Logs a
messagewith the prefix 'LOG'. -
success(
String message, {bool error = true}) → String -
Logs a success
messagein green. -
tip(
String message, {bool error = true}) → String -
Logs a tip
messagein green. -
warning(
String message, {bool error = true}) → String -
Logs a warning
messagein yellow.