ume_kit_console 2.0.1 ume_kit_console: ^2.0.1 copied to clipboard
Show debugPrint kit for ume.
ume_kit_console #
ume 是一款 Flutter 应用内调试工具平台。
ume_kit_console 是 ume 的日志查看插件包。接入方式请见 ume。
此插件无法直接监听 print
或 developer.log
,需要使用 debugPrint
方法打印日志,或者结合 logging、logger 等日志库使用。
如果使用其他日志库,可以调用 consolePrint
将日志输出到应用内控制台。
// logging
Logger.root.onRecord.listen((record) {
consolePrint(record.message);
});
// logger
class UmeConsoleOutput extends LogOutput {
@override
void output(OutputEvent event) {
for (var line in event.lines) {
consolePrint(line);
}
}
}
ume is an in-app debug kits platform produced for Flutter apps.
ume_kit_console is the Console kits package of ume. Please visit ume for details.
This plugin cannot listen to print
or developer.log
directly. You need to use the debugPrint
method to print logs, or use it with another log library such as logging or logger.
If you use another log library, you can call consolePrint
to print the log to the in-app console.
// logging
Logger.root.onRecord.listen((record) {
consolePrint(record.message);
});
// logger
class UmeConsoleOutput extends LogOutput {
@override
void output(OutputEvent event) {
for (var line in event.lines) {
consolePrint(line);
}
}
}