FileCharge class

A BoltCharge that logs output to a file.

The FileCharge will write logs to a file in the specified path. Logs are written to the file in batches, this is done when it reaches the bufferSize or every writeDelay.

Implemented types

Constructors

FileCharge(String path, {int bufferSize = 1000, Duration writeDelay = const Duration(seconds: 5)})
A BoltCharge that logs output to a file.

Properties

bufferSize → int
The size of the buffer (in lines) before writing to the file.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of the charge.
no setteroverride
path → String
The path to the directory where the log files will be written.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
writeDelay → Duration
The delay between writing to the file.
final

Methods

discharge() → void
Discharge the charge.
override
logOutput(ZapEvent event) → void
Log the output of the ZapEvent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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