Fixed some incorrect debug log messages in GamelistFileParser.

This commit is contained in:
Leon Styhre 2022-02-13 20:06:35 +01:00
parent afa6221582
commit 81b819a96a

View file

@ -105,7 +105,7 @@ namespace GamelistFileParser
std::string xmlpath = system->getGamelistPath(false); std::string xmlpath = system->getGamelistPath(false);
if (!Utils::FileSystem::exists(xmlpath)) { if (!Utils::FileSystem::exists(xmlpath)) {
LOG(LogDebug) << "Gamelist::parseGamelist(): System \"" << system->getName() LOG(LogDebug) << "GamelistFileParser::parseGamelist(): System \"" << system->getName()
<< "\" does not have a gamelist.xml file"; << "\" does not have a gamelist.xml file";
return; return;
} }
@ -143,7 +143,8 @@ namespace GamelistFileParser
} }
if (validLabel) { if (validLabel) {
system->setAlternativeEmulator(label); system->setAlternativeEmulator(label);
LOG(LogDebug) << "Gamelist::parseGamelist(): System \"" << system->getName() LOG(LogDebug) << "GamelistFileParser::parseGamelist(): System \""
<< system->getName()
<< "\" has a valid alternativeEmulator entry: \"" << label << "\" has a valid alternativeEmulator entry: \"" << label
<< "\""; << "\"";
} }
@ -181,8 +182,8 @@ namespace GamelistFileParser
if (!showHiddenFiles && if (!showHiddenFiles &&
(Utils::FileSystem::isHidden(path) || (Utils::FileSystem::isHidden(path) ||
Utils::FileSystem::isHidden(Utils::FileSystem::getParent(path)))) { Utils::FileSystem::isHidden(Utils::FileSystem::getParent(path)))) {
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden file \"" << path LOG(LogDebug) << "GamelistFileParser::parseGamelist(): Skipping hidden file \""
<< "\""; << path << "\"";
continue; continue;
} }
@ -205,7 +206,7 @@ namespace GamelistFileParser
else { else {
// Skip arcade asset entries as these will not be used in any way inside // Skip arcade asset entries as these will not be used in any way inside
// the application. // the application.
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping arcade asset \"" LOG(LogDebug) << "GamelistFileParser::parseGamelist(): Skipping arcade asset \""
<< file->getName() << "\""; << file->getName() << "\"";
delete file; delete file;
continue; continue;
@ -216,7 +217,7 @@ namespace GamelistFileParser
// application restart. // application restart.
if (!Settings::getInstance()->getBool("ShowHiddenGames")) { if (!Settings::getInstance()->getBool("ShowHiddenGames")) {
if (file->getHidden()) { if (file->getHidden()) {
LOG(LogDebug) << "Gamelist::parseGamelist(): Skipping hidden " LOG(LogDebug) << "GamelistFileParser::parseGamelist(): Skipping hidden "
<< (type == GAME ? "file" : "folder") << " entry \"" << (type == GAME ? "file" : "folder") << " entry \""
<< file->getName() << "\"" << file->getName() << "\""
<< " (\"" << file->getPath() << "\")"; << " (\"" << file->getPath() << "\")";
@ -397,21 +398,22 @@ namespace GamelistFileParser
if (updateAlternativeEmulator) { if (updateAlternativeEmulator) {
if (hasAlternativeEmulatorTag && system->getAlternativeEmulator() == "") { if (hasAlternativeEmulatorTag && system->getAlternativeEmulator() == "") {
LOG(LogDebug) << "Gamelist::updateGamelist(): Removed the " LOG(LogDebug) << "GamelistFileParser::updateGamelist(): Removed the "
"alternativeEmulator tag for system \"" "alternativeEmulator tag for system \""
<< system->getName() << "\" as the default emulator \"" << system->getName() << "\" as the default emulator \""
<< system->getSystemEnvData()->mLaunchCommands.front().second << system->getSystemEnvData()->mLaunchCommands.front().second
<< "\" was selected"; << "\" was selected";
} }
else if (system->getAlternativeEmulator() != "") { else if (system->getAlternativeEmulator() != "") {
LOG(LogDebug) << "Gamelist::updateGamelist(): " LOG(LogDebug) << "GamelistFileParser::updateGamelist(): "
"Added/updated the alternativeEmulator tag for system \"" "Added/updated the alternativeEmulator tag for system \""
<< system->getName() << "\" to \"" << system->getName() << "\" to \""
<< system->getAlternativeEmulator() << "\""; << system->getAlternativeEmulator() << "\"";
} }
} }
if (numUpdated > 0) { if (numUpdated > 0) {
LOG(LogDebug) << "Gamelist::updateGamelist(): Added/updated " << numUpdated LOG(LogDebug) << "GamelistFileParser::updateGamelist(): Added/updated "
<< numUpdated
<< (numUpdated == 1 ? " entity in \"" : " entities in \"") << (numUpdated == 1 ? " entity in \"" : " entities in \"")
<< xmlWritePath << "\""; << xmlWritePath << "\"";
} }