mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-30 00:07:47 +00:00
chore: update all logging to use centralized logging component
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "Techset/TechniqueStateMapCache.h"
|
||||
#include "Techset/TechsetCommon.h"
|
||||
#include "Techset/TechsetDefinitionCache.h"
|
||||
#include "Utils/Logging/Log.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
@@ -248,7 +249,7 @@ namespace
|
||||
else
|
||||
throw GdtReadingException("ColorMap may not be blank in particle cloud materials");
|
||||
|
||||
std::cout << std::format("Using particlecloud for \"{}\"\n", m_material.info.name);
|
||||
con::info("Using particlecloud for \"{}\"", m_material.info.name);
|
||||
}
|
||||
|
||||
void mtl_tools_template()
|
||||
@@ -1362,7 +1363,7 @@ namespace
|
||||
}
|
||||
catch (const GdtReadingException& e)
|
||||
{
|
||||
std::cerr << std::format("Error while trying to load material from gdt: {} @ GdtEntry \"{}\"\n", e.what(), entry->m_name);
|
||||
con::error("Error while trying to load material from gdt: {} @ GdtEntry \"{}\"", e.what(), entry->m_name);
|
||||
}
|
||||
|
||||
return AssetCreationResult::Failure();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Techset/TechsetDefinitionCache.h"
|
||||
#include "Techset/TechsetFileReader.h"
|
||||
#include "Utils/Alignment.h"
|
||||
#include "Utils/Logging/Log.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
@@ -103,7 +104,7 @@ namespace
|
||||
|
||||
if (shaderSize % sizeof(uint32_t) != 0)
|
||||
{
|
||||
std::cerr << std::format("Invalid shader \"{}\": Size must be dividable by {}\n", fileName, sizeof(uint32_t));
|
||||
con::error("Invalid shader \"{}\": Size must be dividable by {}", fileName, sizeof(uint32_t));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "Game/IW4/TechsetConstantsIW4.h"
|
||||
#include "Utils/Logging/Log.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <format>
|
||||
@@ -31,28 +32,28 @@ namespace
|
||||
{
|
||||
if (decl->streamCount >= std::extent_v<decltype(MaterialVertexStreamRouting::data)>)
|
||||
{
|
||||
std::cerr << std::format("Failed to add vertex decl stream. Too many abbreviations: {}\n", assetName);
|
||||
con::error("Failed to add vertex decl stream. Too many abbreviations: {}", assetName);
|
||||
return AssetCreationResult::Failure();
|
||||
}
|
||||
|
||||
std::string destinationAbbreviation;
|
||||
if (!NextAbbreviation(assetName, destinationAbbreviation, currentOffset))
|
||||
{
|
||||
std::cerr << std::format("Failed to detect vertex decl destination abbreviation: {}\n", assetName);
|
||||
con::error("Failed to detect vertex decl destination abbreviation: {}", assetName);
|
||||
return AssetCreationResult::Failure();
|
||||
}
|
||||
|
||||
const auto foundSourceAbbreviation = std::ranges::find(materialStreamSourceAbbreviation, sourceAbbreviation);
|
||||
if (foundSourceAbbreviation == std::end(materialStreamSourceAbbreviation))
|
||||
{
|
||||
std::cerr << std::format("Unknown vertex decl source abbreviation: {}\n", sourceAbbreviation);
|
||||
con::error("Unknown vertex decl source abbreviation: {}", sourceAbbreviation);
|
||||
return AssetCreationResult::Failure();
|
||||
}
|
||||
|
||||
const auto foundDestinationAbbreviation = std::ranges::find(materialStreamDestinationAbbreviation, destinationAbbreviation);
|
||||
if (foundDestinationAbbreviation == std::end(materialStreamDestinationAbbreviation))
|
||||
{
|
||||
std::cerr << std::format("Unknown vertex decl destination abbreviation: {}\n", destinationAbbreviation);
|
||||
con::error("Unknown vertex decl destination abbreviation: {}", destinationAbbreviation);
|
||||
return AssetCreationResult::Failure();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user