Log class

基于 logger 第三方库封装的日志对象

Constructors

Log({required LogConfig config, bool logFilter(int level) = _logFilter})

Properties

config LogConfig
final
hashCode int
The hash code for this object.
no setterinherited
logFilter bool Function(int level)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

d(dynamic message, [dynamic title, LogConfig? config]) → void
e(dynamic message, [dynamic title, LogConfig? config]) → void
i(dynamic message, [dynamic title, LogConfig? config]) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print(dynamic message, {int level = info, dynamic title, LogConfig? config}) → void
s(dynamic message, [dynamic title, LogConfig? config]) → void
toString() String
A string representation of this object.
inherited
w(dynamic message, [dynamic title, LogConfig? config]) → void

Operators

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

Static Properties

levelColors Map<int, AnsiColor>
不同级别日志对应的颜色集合,你可以直接在 main 方法中重写此对象, 当不希望应用任何日志颜色时,直接赋值 {} 空集合即可
getter/setter pair

Constants

all → const int
debug → const int
error → const int
info → const int
success → const int
warning → const int