UI: Log purged obsolete app paths as Info

This commit is contained in:
Nodir Temirkhodjaev 2024-11-03 11:08:34 +05:00
parent c5dc5b16a3
commit 98ea775e6c
4 changed files with 8 additions and 6 deletions

View File

@ -535,7 +535,7 @@ QVector<qint64> ConfAppManager::collectObsoleteApps(quint32 driveMask)
const qint64 appId = stmt.columnInt64(0);
appIdList.append(appId);
qCDebug(LC) << "Obsolete app:" << appId << appPath;
qCInfo(LC) << "Obsolete app:" << appId << appPath;
}
}

View File

@ -25,8 +25,10 @@ Logger::LogLevel levelByMsgType(QtMsgType type)
case QtCriticalMsg:
case QtFatalMsg:
return Logger::Error;
default:
case QtInfoMsg:
return Logger::Info;
default:
return Logger::Debug;
}
}
@ -36,7 +38,7 @@ void processMessage(QtMsgType type, const QMessageLogContext &context, const QSt
Logger *logger = Logger::instance();
const bool isLogToFile = (level != Logger::Info || logger->debug());
const bool isLogToFile = (level != Logger::Debug || logger->debug());
const bool isLogConsole = logger->console();
if (!(isLogToFile || isLogConsole))
@ -134,7 +136,7 @@ QString Logger::getDateString(const QString &format)
QString Logger::makeLogLine(LogLevel level, const QString &dateString, const QString &message)
{
static const char *const g_levelChars = ".WE";
static const char *const g_levelChars = "..WE";
return dateString + ' ' + g_levelChars[int(level)] + ' ' + message + '\n';
}

View File

@ -12,7 +12,7 @@ protected:
explicit Logger(QObject *parent = nullptr);
public:
enum LogLevel { Info = 0, Warning, Error };
enum LogLevel { Debug = 0, Info, Warning, Error };
Q_ENUM(LogLevel)
bool isPortable() const { return m_isPortable; }

View File

@ -34,5 +34,5 @@ void WindowManagerFake::showErrorBox(
void WindowManagerFake::showInfoBox(const QString &text, const QString &title, QWidget * /*parent*/)
{
qCInfo(LC) << title << ":" << text;
qCDebug(LC) << title << ":" << text;
}