PrettyPrinter class

Default implementation of LogPrinter.

Outut looks like this:

┌──────────────────────────
│ Error info
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ Method stack history
├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
│ Log message
└──────────────────────────
Inheritance

Constructors

PrettyPrinter({int methodCount: 2, int errorMethodCount: 8, int lineLength: 120, bool colors: true, bool printEmojis: true, bool printTime: false})

Properties

colors → bool
final
errorMethodCount → int
final
lineLength → int
final
methodCount → int
final
printEmojis → bool
final
printTime → bool
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

formatAndPrint(Level level, String message, String time, String error, String stacktrace) → dynamic
formatStackTrace(StackTrace stackTrace, int methodCount) → String
getTime() → String
log(LogEvent event) → void
Is called every time a new LogEvent is sent and handles printing or storing the message.
override
stringifyMessage(dynamic message) → String
destroy() → void
inherited
init() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
println(String line) → void
Sends a line to the LogOutput.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

levelColors → Map<Level, AnsiColor>
final
levelEmojis → Map<Level, String>
final
stackTraceRegex → RegExp
final

Constants

bottomLeftCorner → const String
'└'
doubleDivider → const String
"─"
middleCorner → const String
'├'
singleDivider → const String
"┄"
topLeftCorner → const String
'┌'
verticalLine → const String
'│'