Change default log level to info (#5779)

* update qtlogging.ini

* bump some qCDebug to qCInfo and qCWarning
This commit is contained in:
RickyRister 2025-04-02 21:17:10 -07:00 committed by GitHub
parent 2fcdb52157
commit d662152088
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 117 additions and 113 deletions

View file

@ -115,7 +115,7 @@ void PictureLoader::getPixmap(QPixmap &pixmap, CardInfoPtr card, QSize size)
QPixmap bigPixmap;
if (QPixmapCache::find(key, &bigPixmap)) {
if (bigPixmap.isNull()) {
qCWarning(PictureLoaderLog) << "Cached pixmap for key" << key << "is NULL!";
qCDebug(PictureLoaderLog) << "Cached pixmap for key" << key << "is NULL!";
return;
}

View file

@ -213,7 +213,7 @@ void PictureLoaderWorker::picDownloadFailed()
loadQueue.prepend(cardBeingDownloaded);
mutex.unlock();
} else {
qCDebug(PictureLoaderWorkerLog).nospace()
qCWarning(PictureLoaderWorkerLog).nospace()
<< "[card: " << cardBeingDownloaded.getCard()->getCorrectedName()
<< " set: " << cardBeingDownloaded.getSetName() << "]: Picture NOT found, "
<< (picDownload ? "download failed" : "downloads disabled")
@ -424,7 +424,7 @@ void PictureLoaderWorker::picDownloadFinished(QNetworkReply *reply)
}
if (logSuccessMessage) {
qCDebug(PictureLoaderWorkerLog).nospace()
qCInfo(PictureLoaderWorkerLog).nospace()
<< "[card: " << cardBeingDownloaded.getCard()->getName() << " set: " << cardBeingDownloaded.getSetName()
<< "]: Image successfully " << (isFromCache ? "loaded from cached" : "downloaded from") << " url "
<< reply->url().toDisplayString();

View file

@ -32,7 +32,7 @@ void ThemeManager::ensureThemeDirectoryExists()
{
if (SettingsCache::instance().getThemeName().isEmpty() ||
!getAvailableThemes().contains(SettingsCache::instance().getThemeName())) {
qCDebug(ThemeManagerLog) << "Theme name not set, setting default value";
qCInfo(ThemeManagerLog) << "Theme name not set, setting default value";
SettingsCache::instance().setThemeName(NONE_THEME_NAME);
}
}
@ -105,7 +105,7 @@ QBrush ThemeManager::loadExtraBrush(QString fileName, QBrush &fallbackBrush)
void ThemeManager::themeChangedSlot()
{
QString themeName = SettingsCache::instance().getThemeName();
qCDebug(ThemeManagerLog) << "Theme changed:" << themeName;
qCInfo(ThemeManagerLog) << "Theme changed:" << themeName;
QString dirPath = getAvailableThemes().value(themeName);
QDir dir = dirPath;

View file

@ -904,14 +904,14 @@ void MainWindow::startupConfigCheck()
if (SettingsCache::instance().getClientVersion() == CLIENT_INFO_NOT_SET) {
// no config found, 99% new clean install
qCDebug(WindowMainStartupVersionLog)
qCInfo(WindowMainStartupVersionLog)
<< "Startup: old client version empty, assuming first start after clean install";
alertForcedOracleRun(VERSION_STRING, false);
SettingsCache::instance().downloads().resetToDefaultURLs(); // populate the download urls
SettingsCache::instance().setClientVersion(VERSION_STRING);
} else if (SettingsCache::instance().getClientVersion() != VERSION_STRING) {
// config found, from another (presumably older) version
qCDebug(WindowMainStartupVersionLog)
qCInfo(WindowMainStartupVersionLog)
<< "Startup: old client version" << SettingsCache::instance().getClientVersion()
<< "differs, assuming first start after update";
if (SettingsCache::instance().getNotifyAboutNewVersion()) {
@ -920,13 +920,13 @@ void MainWindow::startupConfigCheck()
const auto reloadOk0 = QtConcurrent::run([] { CardDatabaseManager::getInstance()->loadCardDatabases(); });
}
qCDebug(WindowMainStartupShortcutsLog) << "[MainWindow] Migrating shortcuts after update detected.";
qCInfo(WindowMainStartupShortcutsLog) << "[MainWindow] Migrating shortcuts after update detected.";
SettingsCache::instance().shortcuts().migrateShortcuts();
SettingsCache::instance().setClientVersion(VERSION_STRING);
} else {
// previous config from this version found
qCDebug(WindowMainStartupVersionLog) << "Startup: found config with current version";
qCInfo(WindowMainStartupVersionLog) << "Startup: found config with current version";
const auto reloadOk1 = QtConcurrent::run([] { CardDatabaseManager::getInstance()->loadCardDatabases(); });
// Run the tips dialog only on subsequent startups.
@ -1038,11 +1038,11 @@ void MainWindow::changeEvent(QEvent *event)
if (isActiveWindow() && !bHasActivated) {
bHasActivated = true;
if (!connectTo.isEmpty()) {
qCDebug(WindowMainStartupAutoconnectLog) << "Command line connect to " << connectTo;
qCInfo(WindowMainStartupAutoconnectLog) << "Command line connect to " << connectTo;
client->connectToServer(connectTo.host(), connectTo.port(), connectTo.userName(), connectTo.password());
} else if (SettingsCache::instance().servers().getAutoConnect() &&
!SettingsCache::instance().debug().getLocalGameOnStartup()) {
qCDebug(WindowMainStartupAutoconnectLog) << "Attempting auto-connect...";
qCInfo(WindowMainStartupAutoconnectLog) << "Attempting auto-connect...";
DlgConnect dlg(this);
client->connectToServer(dlg.getHost(), static_cast<unsigned int>(dlg.getPort()), dlg.getPlayerName(),
dlg.getPassword());