6Q_LOGGING_CATEGORY(zero,
"0")
7Q_LOGGING_CATEGORY(one,
"1")
8Q_LOGGING_CATEGORY(two,
"2")
9Q_LOGGING_CATEGORY(three,
"3")
10Q_LOGGING_CATEGORY(four,
"4")
11Q_LOGGING_CATEGORY(five,
"5")
23 for (
int i = 0; i <= 5; ++i) {
24 const bool enabled = (i < 5) ? (verbosity > i) : (verbosity >= 5);
25 rules += QString(
"%1 = %2\n").arg(i).arg(enabled ?
"true" :
"false");
28 QLoggingCategory::setFilterRules(rules);
31 qSetMessagePattern(
"%{if-debug}%{line}: %{function} => %{endif}%{message}");
39 : std::runtime_error(translatedMessage.toStdString())
52 return m_englishMessage;
Common logging utilities, the Pandaception error type, and helper macros.
QString englishMessage() const
Returns the English (non-translated) message for logging and crash reports.
const char * file() const
Returns the source file where the exception was thrown, or nullptr.
Pandaception(const QString &translatedMessage, const QString &englishMessage, const char *file=nullptr, int line=0)
Constructs the exception with throw-site location for Sentry.
int line() const
Returns the source line where the exception was thrown, or 0.