mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-05-26 11:31:43 +00:00
chore: add build log for zcg
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <filesystem>
|
||||
#include <format>
|
||||
#include <fstream>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
@@ -176,7 +177,22 @@ bool CodeGenerator::GenerateCode(const IDataRepository* repository)
|
||||
}
|
||||
}
|
||||
const auto end = std::chrono::steady_clock::now();
|
||||
con::debug("Generating code took {}ms", std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
const auto timeInMs = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
|
||||
con::debug("Generating code took {}ms", timeInMs);
|
||||
|
||||
if (!m_args->m_build_log_file.empty())
|
||||
{
|
||||
std::ofstream buildLogFile(m_args->m_build_log_file);
|
||||
if (buildLogFile.is_open())
|
||||
{
|
||||
buildLogFile << "Generating code took " << timeInMs << "ms\n";
|
||||
buildLogFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
con::error("Failed to open build log file");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user