reportInfo method
信息
Implementation
Future<void> reportInfo(String eventName, dynamic content, {StackTrace? stackTrace}) async {
try {
final Map<String, dynamic> output = {
"time": Jiffy.now().format(pattern: 'yyyy-MM-dd HH:mm:ss'),
"eventName": eventName,
"content": content?.toString() ?? 'null',
"stackTrace": indentMultilineText(stackTrace.toString().split('\n').take(20).join('\n'), spaces: 24),
..._singleLogDeviceParams,
};
UtilPrint.trace('[$eventName]: $content');
_logQueue.addToQueue(
path: p.join(dateRootPath, 'application.txt'),
content: normalizeFileContentError(output),
mode: FileMode.append,
);
} catch (e, stackTrace) {
debugPrint('日志服务 - 信息日志: $e\n$stackTrace');
}
}