StdOutLogger class

Logger that logs using the Stdout library. Errors and Warnings are printed on stderr and other messages are logged on stdout.

Inheritance

Constructors

StdOutLogger.new(LogLevel logLevel, {Map<String, String>? replacements, LogLevel? logToStderrLevelThreshold})
Creates a new StdOutLogger.

Properties

hashCode int
The hash code for this object.
no setterinherited
logLevel LogLevel
getter/setter pairinherited
logToStderrLevelThreshold LogLevel?
logToStderrLevelThreshold is the log level threshold at which messages are written to stderr instead of stdout. If null (the default), messages are written to stdout for all log levels.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackedAnimationInProgress ↔ Progress?
getter/setter pair
wrapTextColumn int?
If defined, defines what column width text should be wrapped.
no setteroverride

Methods

debug(String message, {bool newParagraph = false, LogType type = TextLogType.normal}) → void
Display debug message to the user. Commands should use this for information that is important for debugging purposes.
override
error(String message, {bool newParagraph = false, StackTrace? stackTrace, LogType type = TextLogType.normal}) → void
Display an error message to the user. Commands should use this if they want to inform a user that an error has occurred.
override
flush() Future<void>
Returns a Future that completes once all logging is complete.
override
info(String message, {bool newParagraph = false, LogType type = TextLogType.normal}) → void
Display a normal message to the user. Command should use this as the standard communication channel for success, progress or information messages.
override
log(String message, LogLevel level, {bool newParagraph = false, LogType type = TextLogType.normal}) → void
Display a message to the user with a specified level.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
progress(String message, Future<bool> runner(), {bool newParagraph = false}) Future<bool>
Display a progress message on LogLevel.info while running runner function.
override
shouldLog(LogLevel logLevel) bool
toString() String
A string representation of this object.
inherited
warning(String message, {bool newParagraph = false, LogType type = TextLogType.normal}) → void
Display a warning message to the user. Commands should use this if they have important but not critical information for the user.
override
write(String message, LogLevel logLevel, {bool newParagraph = false, bool newLine = true}) → void
Directly write a message to the output. Generally the other methods should be used instead of this. But this method can be used for more direct control of the output.
override

Operators

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