From 644aa4397b03dbef73f8bfedc13925b51cad836b Mon Sep 17 00:00:00 2001 From: saturneric Date: Fri, 5 Jan 2024 20:55:15 +0800 Subject: feat: integrate logging api to core --- src/ui/GpgFrontendApplication.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/ui/GpgFrontendApplication.cpp') diff --git a/src/ui/GpgFrontendApplication.cpp b/src/ui/GpgFrontendApplication.cpp index a9e4efd2..a4c4e2db 100644 --- a/src/ui/GpgFrontendApplication.cpp +++ b/src/ui/GpgFrontendApplication.cpp @@ -58,9 +58,10 @@ bool GpgFrontendApplication::notify(QObject *receiver, QEvent *event) { try { return QApplication::notify(receiver, event); } catch (const std::exception &ex) { - SPDLOG_ERROR("exception was caught in notify: {}", ex.what()); - SPDLOG_ERROR("stacktrace of the exception: {}", - boost::stacktrace::to_string(boost::stacktrace::stacktrace())); + GF_UI_LOG_ERROR("exception was caught in notify: {}", ex.what()); + GF_UI_LOG_ERROR( + "stacktrace of the exception: {}", + boost::stacktrace::to_string(boost::stacktrace::stacktrace())); QMessageBox::information(nullptr, _("Standard Exception Thrown"), _("Oops, an standard exception was thrown " "during the running of the " @@ -68,9 +69,10 @@ bool GpgFrontendApplication::notify(QObject *receiver, QEvent *event) { "be the negligence of the programmer, " "please report this problem if you can.")); } catch (...) { - SPDLOG_ERROR("unknown exception was caught in notify"); - SPDLOG_ERROR("stacktrace of the exception: {}", - boost::stacktrace::to_string(boost::stacktrace::stacktrace())); + GF_UI_LOG_ERROR("unknown exception was caught in notify"); + GF_UI_LOG_ERROR( + "stacktrace of the exception: {}", + boost::stacktrace::to_string(boost::stacktrace::stacktrace())); QMessageBox::information( nullptr, _("Unhandled Exception Thrown"), _("Oops, an unhandled exception was thrown " -- cgit v1.2.3