2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-04-07 20:28:41 +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

View File

@@ -1,5 +1,7 @@
#include "OutputPathFilesystem.h"
#include "Utils/Logging/Log.h"
#include <format>
#include <fstream>
#include <iostream>
@@ -24,14 +26,14 @@ std::unique_ptr<std::ostream> OutputPathFilesystem::Open(const std::string& file
fs::create_directories(containingDirectory, ec);
if (ec)
{
std::cerr << std::format("Failed to create folder '{}' when try to open file '{}'\n", containingDirectory.string(), fileName);
con::error("Failed to create folder '{}' when try to open file '{}'", containingDirectory.string(), fileName);
return nullptr;
}
std::ofstream stream(fullNewPath, std::ios::binary | std::ios::out);
if (!stream.is_open())
{
std::cerr << std::format("Failed to open file '{}'\n", fileName);
con::error("Failed to open file '{}'", fileName);
return nullptr;
}

View File

@@ -1,5 +1,6 @@
#include "SearchPathFilesystem.h"
#include "Utils/Logging/Log.h"
#include "Utils/ObjFileStream.h"
#include <filesystem>
@@ -59,6 +60,6 @@ void SearchPathFilesystem::Find(const SearchPathSearchOptions& options, const st
}
catch (std::filesystem::filesystem_error& e)
{
std::cerr << std::format("Directory Iterator threw error when trying to find files: \"{}\"\n", e.what());
con::error("Directory Iterator threw error when trying to find files: \"{}\"", e.what());
}
}