mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[CrashReporting] Give crash-report logging its own category per review
This commit is contained in:
parent
4d790ff388
commit
9ced9b61ef
3 changed files with 8 additions and 2 deletions
|
|
@ -6,10 +6,13 @@
|
|||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QLoggingCategory>
|
||||
#include <QRegularExpression>
|
||||
#include <QUrl>
|
||||
#include <libcockatrice/settings/personal_settings.h>
|
||||
|
||||
Q_LOGGING_CATEGORY(CrashReportLog, "crash_report");
|
||||
|
||||
bool CrashReporter::isReportingEnabled(const QString &dsn, PersonalSettings::CrashReportingMode consentMode)
|
||||
{
|
||||
return !dsn.isEmpty() && consentMode != PersonalSettings::CrashReportingMode::NeverSend;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef CRASH_REPORTER_H
|
||||
#define CRASH_REPORTER_H
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <QString>
|
||||
#include <libcockatrice/settings/personal_settings.h>
|
||||
|
||||
|
|
@ -17,6 +18,8 @@
|
|||
#define COCKATRICE_SENTRY_DSN ""
|
||||
#endif
|
||||
|
||||
Q_DECLARE_LOGGING_CATEGORY(CrashReportLog);
|
||||
|
||||
/**
|
||||
* @brief Sentry-backed crash-report facade, owned by main().
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue