SimpleLogger class

A simple logger class, the provides file-optimized logs.

These logs are plain, color- and decoration-less, without any special symbols or control characters. You typically use this logger, if the logging target is a plain file or some other, linear data stream that is not meant to be displayed by a rich terminal.

For advanced logging, i.e. to a console/TTY, use ConsoleLogger instead.

Implemented types

Constructors

SimpleLogger({IOSink? outSink, IOSink? errSink, LogLevel logLevel = LogLevel.info})
Default constructor.

Properties

errSink IOSink
The IOSink for forwarding error output from subprocesses.
final
hashCode int
The hash code for this object.
no setterinherited
logLevel LogLevel
The current LogLevel level of the logger.
final
outSink IOSink
The IOSink for normal log messages
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>> errStream) 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