From e573985c10bd88b64617babc676bafc35c23a249 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Tue, 17 Aug 2021 23:51:13 +0800 Subject: [PATCH] swagLogMessageHandler: replace magic number with macro (#21944) --- selfdrive/ui/qt/util.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/selfdrive/ui/qt/util.cc b/selfdrive/ui/qt/util.cc index 40a531062..3f98283bf 100644 --- a/selfdrive/ui/qt/util.cc +++ b/selfdrive/ui/qt/util.cc @@ -105,12 +105,12 @@ void ClickableWidget::paintEvent(QPaintEvent *) { void swagLogMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { static std::map levels = { - {QtMsgType::QtDebugMsg, 10}, - {QtMsgType::QtInfoMsg, 20}, - {QtMsgType::QtWarningMsg, 30}, - {QtMsgType::QtCriticalMsg, 40}, - {QtMsgType::QtSystemMsg, 40}, - {QtMsgType::QtFatalMsg, 50}, + {QtMsgType::QtDebugMsg, CLOUDLOG_DEBUG}, + {QtMsgType::QtInfoMsg, CLOUDLOG_INFO}, + {QtMsgType::QtWarningMsg, CLOUDLOG_WARNING}, + {QtMsgType::QtCriticalMsg, CLOUDLOG_ERROR}, + {QtMsgType::QtSystemMsg, CLOUDLOG_ERROR}, + {QtMsgType::QtFatalMsg, CLOUDLOG_CRITICAL}, }; std::string file, function;