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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user