VoidLogger class

Logger that logs no output.

Intended to be used for testing to silence any printed output.

Inheritance

Constructors

VoidLogger()

Properties

hashCode → int
The hash code for this object.
no setterinherited
logLevel ↔ LogLevel
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
wrapTextColumn → int?
If defined, defines what column width text should be wrapped.
no setteroverride

Methods

debug(String message, {bool newParagraph = false, LogType type = const RawLogType()}) → 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 = const RawLogType()}) → 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 = const RawLogType()}) → 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 = const RawLogType()}) → 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(), {String? successMessage, bool newParagraph = true}) → Future<bool>
Display a progress spinner and message on LogLevel.info while running runner function.
override
progressStream<T>(String initialMessage, Stream<T> stream, {String toMessage(T)?, bool isSuccess(T)?, bool newParagraph = false}) → Future<T>
Display a progress spinner and a stream of messages on LogLevel.info. When the stream is ended, the progress spinner is completed, with a failure status if the stream ends with an error.
override
toString() → String
A string representation of this object.
inherited
warning(String message, {bool newParagraph = false, LogType type = const RawLogType()}) → 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