FileSink class
File sink that writes logs to a file with optional rotation
Constructors
- FileSink({required String filename, LogFormatter? formatter, String? directory, bool enableRotation = false, int maxFileSize = 10 * 1024 * 1024, int maxFiles = 5, RotationType rotationType = RotationType.size})
Properties
- enableRotation → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAvailable → bool
-
Check if this sink is available on the current platform
no setteroverride
- maxFiles → int
-
final
- maxFileSize → int
-
final
- rotationType → RotationType
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< void> -
Clear all logs in this sink (if supported)
override
-
dispose(
) → Future< void> -
Dispose any resources used by this sink
override
-
log(
LogEntry entry) → Future< void> -
Log an entry to this sink
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited