LogFileNameFormatter class

File formatting with dates for rotation date logging with TimedRollingFileTree.

Constructors

LogFileNameFormatter({String filenameFormat = 'log_YYMMDD-HH.txt'})
Creates LogFileNameFormatter with given format or by default
LogFileNameFormatter.daily({String prefix = 'log_', String postfix = '.txt'})
Factory method to create daily filename formatter with prefix and postfix
factory
LogFileNameFormatter.full({String prefix = 'log_', String postfix = '.txt'})
Factory method to create date and time filename formatter with prefix and postfix.
factory
LogFileNameFormatter.hourly({String prefix = 'log_', String postfix = '.txt'})
Factory method to create hourly filename formatter with prefix and postifx.
factory
LogFileNameFormatter.weekly({String prefix = 'log_', String postfix = '.txt'})
Factory method to create weekly filename formatter with prefix and postfix
factory

Properties

filenameFormat String
Filename format for files created with this formatter.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

format(DateTime dateTime) String
Formats date time based on defined formatter
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