TimedRollingFileTree class
Time base rolling file tree. It will use time span to roll logging to next file.
- Inheritance
-
- Object
- LogTree
- CustomFormatTree
- FimberFileTree
- RollingFileTree
- TimedRollingFileTree
Constructors
- TimedRollingFileTree({int timeSpan = TimedRollingFileTree.dailyTime, dynamic logFormat = CustomFormatTree.defaultFormat, String filenamePrefix = 'log_', String filenamePostfix = '.txt', dynamic logLevels = CustomFormatTree.defaultLevels})
- Creates Time based rolling file tree. It allows to define time span when this
Properties
-
colorizeMap
↔ Map<
String, ColorizeStyle> -
Map of log levels and their colorizing style.
getter/setter pairinherited
- fileNameFormatter ↔ LogFileNameFormatter
-
Log filename formatter see: LogFileNameFormatter
getter/setter pair
- filenamePostfix ↔ String
-
Generated filename postfix
getter/setter pair
- filenamePrefix ↔ String
-
Generated filename prefix, supports path to the file.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- logFormat ↔ String
-
Log line format style.
getter/setter pairinherited
- maxHistoryFiles ↔ int
-
Maximum of number of files in history.
getter/setter pair
- outputFileName ↔ String
-
Output current log file name.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeSpan ↔ int
-
File rolling based on this time span. Default 1h
getter/setter pair
Methods
-
close(
) → void -
Closes a tree,
use it to flush buffer/caches or close any resource.
inherited
-
getLevels(
) → List< String> -
Gets levels of logging serviced by this LogTree
inherited
-
log(
String level, String msg, {String? tag, dynamic ex, StackTrace? stacktrace}) → void -
Logs a message with level/tag and optional stacktrace or exception.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printLine(
String line, {String? level}) → void -
Prints log line with optional log level.
inherited
-
printLog(
String logLine, {String? level}) → void -
Method to overload printing to output stream the formatted logline
Adds handing of time
inherited
-
rollToNextFile(
) → void -
Roll to new file
override
-
shouldRollNextFile(
) → bool -
Return true if log file should rotate to new.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- dailyTime → const int
- Number of seconds in a day
- hourlyTime → const int
- Number of seconds in an hour
- weeklyTime → const int
- Number of seconds in a week