检查内部日志
您可以在运行时检查Qt Creator 的内部日志信息,而无需重新启动或配置日志规则。当您开发Qt Creator 、需要调查面临的某些问题或想查看幕后情况时,日志信息会很有帮助。
要打开日志查看器并开始收集日志信息,请选择Tools > > 。 Debug Qt Creator>Show Logs 。

查看器会显示所选日志类别中的日志信息。如果您定义了日志记录规则,它们可能会在启动时列出。否则,类别列表会在您使用Qt Creator 时扩展。
注意: 信息不会缓存,因此查看器只会显示启用类别后记录的信息。
查看日志
要启用日志类别,请在Category 中选择它们。要指定显示相应类别信息的级别,请选择Debug,Warning,Critical, 或Info 。Fatal 信息总是启用的。
如果启用多个类别,可以为每个类别中的邮件指定不同的颜色。双击Color 的值,为类别选择颜色。
要存储有关当前启用类别的信息,请在上下文菜单中选择Save Enabled as Preset 。要加载保存的信息,请选择Update from Preset 。
要保存显示的信息内容,请选择
(Save Log)。要复制所有或选定的信息,请在右键菜单中选择Copy All 或Copy Selected Logs 。
要清除显示的信息内容,请选择
(Clear)。
要暂时停止记录,请选择
(Stop Logging)。要继续记录,请选择
(Start Logging)。
在搜索字段中使用正则表达式过滤类别。默认情况下,日志类别和直接来自 Qt 的消息会被过滤掉。要显示它们,请选择
(Clear text) 或手动清除搜索字段。要再次隐藏它们,请选择
(Filter Qt Internal Logging Categories)。
新信息会自动将信息显示滚动到底部。要停止自动滚动,请切换
(Auto Scroll)。
默认情况下,邮件列表只显示时间戳,不显示邮件类型。要隐藏或显示此信息,请切换
(Timestamps) 和
(Message Types)。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.