SynchronizedFileOutput class

SynchronizedFileOutput enables the logging to a text file.

Since the void output(OutputEvent event) method is synchronous in the interface LogOutput an intermediate stream is used to handle write requests to the output file that get performed only if the file is not being written. This is implemented with a blocking-IO mechanism enabled by the class Lock of the library synchronized.

Constructors

SynchronizedFileOutput(File _file)
A File instance is required for enabling this type of LogOutput.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
Destroys the stream controller.
init() → void
Opens the file that was given as a reference in the constructor (and creates it if it does not exist).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
output(OutputEvent event) → void
Outputs the first line of event.lines in the file.
toString() String
A string representation of this object.
inherited

Operators

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