qt 自带的日志系统研习

本文主要使用的工具是qInstallMessageHandler,详细说明参见一去、二三里大神的博客

函数原型为:

QtMessageHandler <QtGlobal>::qInstallMessageHandler(QtMessageHandler handler)

说明

原文说明:

Installs a Qt message handler which has been defined previously. Returns a pointer to the previous message handler.
The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages.
The default message handler 

猜你喜欢

转载自blog.csdn.net/MMTS_yang/article/details/107000122
今日推荐