MyLogger class

Constructors

MyLogger({required String className})

Properties

className String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

config(MyLogItem msg) → void
fine(MyLogItem msg) → void
finer(MyLogItem msg) → void
finest(MyLogItem msg) → void
info(MyLogItem msg) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
severe(MyLogItem msg) → void
shout(MyLogItem msg) → void
toString() String
A string representation of this object.
inherited
warning(MyLogItem msg) → void

Operators

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

Static Methods

enableDebugPrint() → void
  • 如果希望输出日志,需要调用一次MyLogger.enableDebugPrint()
  • 当然也可以自己通过listenLog监听处理日志
  • listenLog(void onLog(LogRecord)?) → void
  • 监听并自定义处理收到的日志
  • 多个不同的MyLogger收集到的日志都会汇集于此
  • to() MyLogger
    获得全局通用单例