ConsoleLogger class

An advanced logger, that providers console optimized, interactive logging.

This class uses colors and other ANSI-escapes to provide logs to the user via a TTY. It constantly updates lines and replaces content to provide a smooth logging experience. This logger should not be used in conjunction with a log file or other, non-console output.

For simple logging, i.e. to a file, use SimpleLogger instead.

Implemented types

Constructors

ConsoleLogger([LogLevel logLevel = LogLevel.info])
Default constructor.

Properties

hashCode int
The hash code for this object.
no setterinherited
logLevel LogLevel
The current LogLevel level of the logger.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

completeStatus() → void
Completes the current status message.
override
debug(String message) → void
Logs a message with LogLevel.debug.
override
error(String message) → void
Logs a message with LogLevel.error.
override
except(Exception exception, [StackTrace? stackTrace]) → void
Logs an exception with LogLevel.except.
override
info(String message) → void
Logs a message with LogLevel.info.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pipeStderr(Stream<List<int>> stderr) Future<void>
Pipes the stderr of for example a process to the logger
override
toString() String
A string representation of this object.
inherited
updateStatus({String? message, TaskStatus? status, String? detail, bool clear = false, bool refresh = true}) → void
Updates the current status message.
override
warn(String message) → void
Logs a message with LogLevel.warn.
override

Operators

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