CustomLogOutput class

一个高度可定制的日志输出器。

本身不执行任何日志记录操作,而是将接收到的每个事件 委托给一个由用户在构造时提供的 onLog 回调函数。 这允许用户将 SDK 的监控数据无缝集成到项目现有的日志框架中。

Inheritance

Constructors

CustomLogOutput({required MonitorLogHandler onLog})
创建一个自定义日志输出器。

Properties

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

Methods

add(Map<String, dynamic> event) → void
接收一个事件,并立即通过 onLog 回调将其传递给用户。
override
dispose() → void
销毁并清理资源,例如取消定时器。
override
flush({bool isAppExiting = false}) Future<void>
强制将所有缓存的事件发送出去。
override
init() → void
初始化输出器,例如启动定时器。
inherited
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