DecoratedPrinter mixin

The DecoratedPrinter mixin extends the functionality of the ILogRecorder interface by adding a decorate method.

This mixin is designed to be used with classes that implement the ILogRecorder interface.

The purpose of the DecoratedPrinter mixin is to enable the decoration of log messages using a list of decorators specified by the decoration property.

Superclass Constraints
Mixin Applications

Properties

decoration List<LogDecorator>
returns a list of LogDecorator functions.
no setter
hashCode int
The hash code for this object.
no setterinherited
logLevel int
The logLevel getter returns the log level of the log recorder instance. This log level represents the minimum level of logs that will be recorded by this recorder.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canRecord(LogRecordEntity record) bool
validate whether the current log record should be recorded by the log recorder instance. By default, it checks if the log level of the log recorder is equal to or less than the log level of the given record parameter.
inherited
close() → void
called when this particular log recorder is removed from the manager. It serves as a cleanup or finalization method for any resources or operations associated with the log recorder.
inherited
decorate(String message, LogRecordEntity record) String
The decorate method is a method that receives a non-decorated log message as message and a LogRecordEntity object as record. It applies the decoration logic using the list of LogDecorator functions specified in the decoration property.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRecord(LogRecordEntity record) → void
a callback that will be invoked when the manager receives a new log record that can be recorded by this specific recorder. It takes a LogRecordEntity object as a parameter, representing the log record that was received.
inherited
toString() String
A string representation of this object.
inherited

Operators

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