diff --git a/cockatrice/src/client/crash/crash_reporter.cpp b/cockatrice/src/client/crash/crash_reporter.cpp index 41a6f2726..fe1678b11 100644 --- a/cockatrice/src/client/crash/crash_reporter.cpp +++ b/cockatrice/src/client/crash/crash_reporter.cpp @@ -6,10 +6,13 @@ #include #include +#include #include #include #include +Q_LOGGING_CATEGORY(CrashReportLog, "crash_report"); + bool CrashReporter::isReportingEnabled(const QString &dsn, PersonalSettings::CrashReportingMode consentMode) { return !dsn.isEmpty() && consentMode != PersonalSettings::CrashReportingMode::NeverSend; diff --git a/cockatrice/src/client/crash/crash_reporter.h b/cockatrice/src/client/crash/crash_reporter.h index b32a41e27..f57ec6019 100644 --- a/cockatrice/src/client/crash/crash_reporter.h +++ b/cockatrice/src/client/crash/crash_reporter.h @@ -6,6 +6,7 @@ #ifndef CRASH_REPORTER_H #define CRASH_REPORTER_H +#include #include #include @@ -17,6 +18,8 @@ #define COCKATRICE_SENTRY_DSN "" #endif +Q_DECLARE_LOGGING_CATEGORY(CrashReportLog); + /** * @brief Sentry-backed crash-report facade, owned by main(). * diff --git a/cockatrice/src/interface/widgets/dialogs/dlg_crash_report.cpp b/cockatrice/src/interface/widgets/dialogs/dlg_crash_report.cpp index 4061c864f..7fc69e12b 100644 --- a/cockatrice/src/interface/widgets/dialogs/dlg_crash_report.cpp +++ b/cockatrice/src/interface/widgets/dialogs/dlg_crash_report.cpp @@ -136,9 +136,9 @@ void DlgCrashReport::actSend() } const QString savedPath = writeMockReport(previewArea->toPlainText()); if (savedPath.isEmpty()) { - qWarning() << "Could not save the mock crash report locally"; + qCWarning(CrashReportLog) << "Could not save the mock crash report locally"; } else { - qInfo() << "Mock crash report saved locally to" << savedPath; + qCInfo(CrashReportLog) << "Mock crash report saved locally to" << savedPath; } accept(); }