FileLogOutput class
A custom LogOutput
implementation that can write logs to both
console and a file simultaneously.
This class extends the LogOutput
class from the logger package
to provide file writing capabilities alongside console output.
Constructors
- FileLogOutput.new({required bool writeLogToConsole, required bool writeLogToFile, required String logFilePath})
- Creates a new FileLogOutput instance.
Properties
- fileIOSink ↔ IOSink
-
The IOSink used to write to the log file.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- logFilePath → String
-
The full path to the log file.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- writeLogToConsole → bool
-
Whether to write logs to the console using debugPrint.
final
- writeLogToFile → bool
-
Whether to write logs to a file.
final
Methods
-
destroy(
) → Future< void> - Cleans up resources when the logger is destroyed.
-
init(
) → Future< void> - Initializes the log output.
-
initIOSink(
) → void - Initializes the IOSink for file writing.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
output(
OutputEvent event) → void - Processes a log output event.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited