TracerFileHandler class

A handler outputting the log events to the file system.

It uses TracerEventData.generatedMessage.

The log files are created in dir. If useDate is true yyyy-MM-dd.log created in the directory, otherwise latest.log is used.

If shareFile is enabled, all sections (that have dir set to the same directory) share the same log file. Otherwise a suffix with the section name is added to the file name.

All of the above can be overwritten using customName. If it it set, the filename is not variable and just that value.

Inheritance

Constructors

TracerFileHandler(Directory dir, {bool append = true, bool shareFile = true, bool useDate = true, String? customName})

Properties

append bool
Whether to enable appending to the existing file. If disabled, the existing content of the log file will be wiped once the first log from this Tracer instance is created.
final
customName String?
A custom name used for the log file. This has to include a file ending, .log is recommended.
final
dir Directory
The directory to create the log files in.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shareFile bool
Whether not to add a suffix to the log file name.
final
useDate bool
Whether to se the current date for the log file. If disabled latest.log is used.
final

Methods

handle(TracerEventData data) → void
The function handling the event.
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