2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-04-29 15:09:38 +00:00

chore: update all logging to use centralized logging component

This commit is contained in:
Jan Laupetin
2025-09-10 19:52:42 +02:00
parent 1bf4033f41
commit 02f20f09b6
161 changed files with 824 additions and 664 deletions
@@ -4,6 +4,7 @@
#include "Game/T6/T6.h"
#include "InfoString/InfoString.h"
#include "InfoStringLoaderVehicleT6.h"
#include "Utils/Logging/Log.h"
#include <cstring>
#include <format>
@@ -31,7 +32,7 @@ namespace
InfoString infoString;
if (!infoString.FromGdtProperties(*gdtEntry))
{
std::cerr << std::format("Failed to read vehicle gdt entry: \"{}\"\n", assetName);
con::error("Failed to read vehicle gdt entry: \"{}\"", assetName);
return AssetCreationResult::Failure();
}
@@ -3,6 +3,7 @@
#include "Game/T6/InfoString/InfoStringToStructConverter.h"
#include "Game/T6/T6.h"
#include "Game/T6/Vehicle/VehicleFields.h"
#include "Utils/Logging/Log.h"
#include <cassert>
#include <cstring>
@@ -37,7 +38,7 @@ namespace
if (endPtr != &value[value.size()])
{
std::cerr << std::format("Failed to parse value \"{}\" as mph\n", value);
con::error("Failed to parse value \"{}\" as mph", value);
return false;
}
@@ -51,7 +52,7 @@ namespace
if (endPtr != &value[value.size()])
{
std::cerr << std::format("Failed to parse value \"{}\" as pounds\n", value);
con::error("Failed to parse value \"{}\" as pounds", value);
return false;
}
@@ -79,7 +80,7 @@ namespace
}
*reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(m_structure) + field.iOffset) = TEAM_BAD;
std::cerr << std::format("Failed to parse value \"{}\" as team\n", value);
con::error("Failed to parse value \"{}\" as team", value);
return false;
}
@@ -127,7 +128,7 @@ namespace vehicle
infoString, *vehicleDef, m_zone.m_script_strings, m_memory, context, registration, vehicle_fields, std::extent_v<decltype(vehicle_fields)>);
if (!converter.Convert())
{
std::cerr << std::format("Failed to parse vehicle: \"{}\"\n", assetName);
con::error("Failed to parse vehicle: \"{}\"", assetName);
return AssetCreationResult::Failure();
}
@@ -4,6 +4,7 @@
#include "Game/T6/T6.h"
#include "InfoString/InfoString.h"
#include "InfoStringLoaderVehicleT6.h"
#include "Utils/Logging/Log.h"
#include "Vehicle/VehicleCommon.h"
#include <cstring>
@@ -33,7 +34,7 @@ namespace
InfoString infoString;
if (!infoString.FromStream(ObjConstants::INFO_STRING_PREFIX_VEHICLE, *file.m_stream))
{
std::cerr << std::format("Could not parse as info string file: \"{}\"\n", fileName);
con::error("Could not parse as info string file: \"{}\"", fileName);
return AssetCreationResult::Failure();
}