DVRotatingLogFile class

A rotating log file, on a target with no file system to put it on.

Constructing one throws rather than returning a log that silently keeps nothing: the browser keeps its records in the in-process buffer and the console, and says so, rather than pretending to have a file.

Implemented types

Constructors

DVRotatingLogFile(String directory, {int maxBytes = DVRotatingLogFile.defaultMaxBytes, int files = DVRotatingLogFile.defaultFiles, Duration retention = DVRotatingLogFile.defaultRetention, DateTime clock()?})

Properties

directory → String
final
failures → int
no setter
files → int
final
hashCode → int
The hash code for this object.
no setterinherited
maxBytes → int
final
retention → Duration
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Removes every record. The log keeps working afterwards.
override
close() → void
Releases the open file. Writing again reopens it.
override
export() → String
Every record still kept, oldest first, one JSON object per line.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
write(DVLogRecord record) → void
override

Operators

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

Constants

defaultFiles → const int
defaultMaxBytes → const int
defaultRetention → const Duration