mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-12-16 15:47:47 +00:00
chore: update all logging to use centralized logging component
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "ZoneWriter.h"
|
||||
|
||||
#include "Utils/Logging/Log.h"
|
||||
#include "WritingException.h"
|
||||
#include "WritingFileStream.h"
|
||||
|
||||
@@ -73,12 +74,12 @@ bool ZoneWriter::WriteZone(std::ostream& stream)
|
||||
}
|
||||
catch (WritingException& e)
|
||||
{
|
||||
std::cout << std::format("Writing fastfile failed: {}\n", e.Message());
|
||||
con::error("Writing fastfile failed: {}", e.Message());
|
||||
return false;
|
||||
}
|
||||
catch (std::runtime_error& e)
|
||||
{
|
||||
std::cout << std::format("Writing fastfile failed: {}\n", e.what());
|
||||
con::error("Writing fastfile failed: {}", e.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "ZoneWriting.h"
|
||||
|
||||
#include "Utils/Logging/Log.h"
|
||||
#include "Writing/IZoneWriterFactory.h"
|
||||
|
||||
#include <chrono>
|
||||
@@ -15,7 +16,7 @@ bool ZoneWriting::WriteZone(std::ostream& stream, const Zone& zone)
|
||||
const auto zoneWriter = factory->CreateWriter(zone);
|
||||
if (zoneWriter == nullptr)
|
||||
{
|
||||
std::cerr << std::format("Could not create ZoneWriter for zone \"{}\".\n", zone.m_name);
|
||||
con::error("Could not create ZoneWriter for zone \"{}\".", zone.m_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -23,7 +24,7 @@ bool ZoneWriting::WriteZone(std::ostream& stream, const Zone& zone)
|
||||
|
||||
const auto end = std::chrono::high_resolution_clock::now();
|
||||
|
||||
std::cout << std::format("Writing zone \"{}\" took {} ms.\n", zone.m_name, std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
con::info("Writing zone \"{}\" took {} ms.", zone.m_name, std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user