HatangLogger class

Where the SDK writes its logs. Pass one to HatangChat.configure; the default is HatangLogger.silent.

Constructors

HatangLogger(void sink(HatangLogLevel level, String message), {HatangLogLevel minLevel = HatangLogLevel.info})
Creates a logger that forwards every record at or above minLevel to sink.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
minLevel → HatangLogLevel
Records below this level are dropped.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sink → void Function(HatangLogLevel level, String message)
The sink.
final

Methods

debug(String message) → void
Logs at debug.
error(String message) → void
Logs at error.
info(String message) → void
Logs at info.
log(HatangLogLevel level, String message) → void
Logs at level.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
warn(String message) → void
Logs at warn.

Operators

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

Constants

console → const HatangLogger
Prints to the console with a [hatang] prefix.
silent → const HatangLogger
Drops everything.