Log class abstract

Logger tools, secondary packaging based on "logger/logger".

Through the enableConsole and onCollect parameters to control the log output switch.

Log.enableConsole = true;
Log.onCollect = (LogLevel level, List<String> lines) {
  sendToNetwork(level, lines.join("\n"));
};
Log.i({"sample":"map"});
Log.d(true);
Log.e("Sample string");

Constructors

Log()

Properties

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

enableConsole bool
getter/setter pair
logLevel LogLevel
no getter
onCollect ↔ _OnCollectCallback?
getter/setter pair

Static Methods

d(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.debug.
e(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.error.
i(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.info.
v(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.verbose.
w(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.warning.
wtf(dynamic message, [StackTrace? stackTrace]) → void
Log a message at level Level.wtf.