CustomFormatTree class

Custom format tree. Tag generation included allows to define tokens in format, which will be replaced with a value for each log line.

Inheritance

Constructors

CustomFormatTree({String logFormat = defaultFormat, List<String> logLevels = defaultLevels, bool useColors = false})
Creates custom format logging tree

Properties

colorizeMap Map<String, ColorizeStyle>
Map of log levels and their colorizing style.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
logFormat String
Log line format style.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getLevels() List<String>
Gets levels of logging serviced by this LogTree
override
log(String level, String msg, {String? tag, dynamic ex, StackTrace? stacktrace}) → void
Logs a message with level/tag and optional stacktrace or exception.
override
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.
printLog(String logLine, {String? level}) → void
Method to overload printing to output stream the formatted logline Adds handing of time
toString() String
A string representation of this object.
inherited

Operators

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

Constants

charAtIndexToken → const String
Format token for character index on the line
defaultFormat → const String
Default format for timestamp based log message.
defaultLevels → const List<String>
List of default levels for debug logging
exceptionMsgToken → const String
Format token for exception message
exceptionStackToken → const String
Format token for exception's stacktrace
fileNameToken → const String
Format token for file name.
filePathToken → const String
Format token for file path.
levelToken → const String
Format token for log level character
lineNumberToken → const String
Format token for file's line number
messageToken → const String
Format token for main log message
tagToken → const String
Format token for log tag
timeClockFlag → const int
Flag clock time in format
timeElapsedFlag → const int
Flag elapsed time in format
timeElapsedToken → const String
Format token for time elapsed
timeStampToken → const String
Format token for time stamp