Create a Fatal logging level, and use it when sqlite symbols can't be resolved.
This commit is contained in:
parent
611731ed4a
commit
f0b9120c43
@ -158,6 +158,7 @@ QDebug CreateLogger(Level level, const QString& class_name, int line) {
|
||||
case Level_Info: level_name = " INFO "; break;
|
||||
case Level_Warning: level_name = " WARN "; break;
|
||||
case Level_Error: level_name = " ERROR "; break;
|
||||
case Level_Fatal: level_name = " FATAL "; break;
|
||||
}
|
||||
|
||||
// Check the settings to see if we're meant to show or hide this message.
|
||||
@ -175,7 +176,12 @@ QDebug CreateLogger(Level level, const QString& class_name, int line) {
|
||||
function_line += ":" + QString::number(line);
|
||||
}
|
||||
|
||||
QDebug ret(QtDebugMsg);
|
||||
QtMsgType type = QtDebugMsg;
|
||||
if (level == Level_Fatal) {
|
||||
type = QtFatalMsg;
|
||||
}
|
||||
|
||||
QDebug ret(type);
|
||||
ret.nospace() << kMessageHandlerMagic
|
||||
<< QDateTime::currentDateTime().toString("hh:mm:ss.zzz").toAscii().constData()
|
||||
<< level_name << function_line.leftJustified(32).toAscii().constData();
|
||||
|
@ -40,6 +40,7 @@ namespace logging {
|
||||
};
|
||||
|
||||
enum Level {
|
||||
Level_Fatal = -1,
|
||||
Level_Error = 0,
|
||||
Level_Warning,
|
||||
Level_Info,
|
||||
|
@ -303,7 +303,8 @@ void Database::StaticInit() {
|
||||
!_sqlite3_backup_finish ||
|
||||
!_sqlite3_backup_pagecount ||
|
||||
!_sqlite3_backup_remaining) {
|
||||
qLog(Error) << "Couldn't resolve sqlite symbols";
|
||||
qLog(Fatal) << "Couldn't resolve sqlite symbols. Please compile "
|
||||
"Clementine with -DSTATIC_SQLITE=ON.";
|
||||
sLoadedSqliteSymbols = false;
|
||||
} else {
|
||||
sLoadedSqliteSymbols = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user