chore: update all logging to use centralized logging component

This commit is contained in:
Jan Laupetin
2025-09-11 20:25:51 +02:00
parent 1bf4033f41
commit 02f20f09b6
161 changed files with 824 additions and 664 deletions
@@ -6,6 +6,7 @@
#include "Image/IwiLoader.h"
#include "Image/IwiWriter8.h"
#include "ObjWriting.h"
#include "Utils/Logging/Log.h"
#include <algorithm>
#include <cassert>
@@ -41,7 +42,7 @@ namespace
const auto filePathImage = searchPath.Open(imageFileName);
if (!filePathImage.IsOpen())
{
std::cerr << std::format("Could not find data for image \"{}\"\n", image.name);
con::error("Could not find data for image \"{}\"", image.name);
return nullptr;
}
@@ -2,6 +2,7 @@
#include "Dumping/Localize/StringFileDumper.h"
#include "Localize/LocalizeCommon.h"
#include "Utils/Logging/Log.h"
#include <format>
#include <iostream>
@@ -38,7 +39,7 @@ namespace localize
}
else
{
std::cerr << std::format("Could not create string file for dumping localized strings of zone '{}'\n", context.m_zone.m_name);
con::error("Could not create string file for dumping localized strings of zone '{}'", context.m_zone.m_name);
}
}
} // namespace localize
@@ -1,5 +1,7 @@
#include "RawFileDumperIW5.h"
#include "Utils/Logging/Log.h"
#include <format>
#include <stdexcept>
#include <zlib.h>
@@ -52,7 +54,7 @@ namespace raw_file
if (ret < 0)
{
std::cerr << std::format("Inflate failed when attempting to dump rawfile '{}'\n", rawFile->name);
con::error("Inflate failed when attempting to dump rawfile '{}'", rawFile->name);
inflateEnd(&zs);
return;
}
@@ -2,6 +2,7 @@
#include "Sound/WavTypes.h"
#include "Sound/WavWriter.h"
#include "Utils/Logging/Log.h"
#include <format>
@@ -45,7 +46,7 @@ namespace sound
break;
default:
std::cerr << std::format("Unknown format {} for loaded sound: {}\n", loadedSound->sound.info.format, loadedSound->name);
con::error("Unknown format {} for loaded sound: {}", loadedSound->sound.info.format, loadedSound->name);
break;
}
}