使用日志视图 (Logging view)

简介

What is it?

日志视图展示 Dart 运行时和应用框架(比如 Flutter)的事件,以及应用级日志。

The logging view displays events from the Dart runtime, application frameworks (like Flutter), and application-level logging events.

标准日志事件

Standard logging events

默认情况下,日志视图会展示:

By default, the logging view shows:

  • Dart 运行时的垃圾回收事件

    Garbage collection events from the Dart runtime

  • Flutter 框架事件,比如创建帧的事件

    Flutter framework events, like frame creation events

  • 应用的 stdoutstderr 输出

    stdout and stderr from applications

  • 应用的自定义日志事件

    Custom logging events from applications

日志视图的截图

Screenshot of a logging view

应用日志

Logging from your application

要在代码中输出日志,请查看 添加输出代码的方式调试 Flutter 应用 页面的 日志 部分。

To implement logging in your code, see the Logging section in the Debugging Flutter apps programmatically page.

清理日志

Clearing logs

要清理日志视图的日志记录,请点击 Clear logs(清理日志)按钮。

To clear the log entries in the logging view, click the Clear logs button.