Core: add configurable startup log rotation

This commit is contained in:
faumaray committed 2026-07-28 21:10:09 +03:00
1 parent a277f2102b
commit 9637f1eef7
9 files changed
+361 -27

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#pragma once
#include <cstddef>
#include <filesystem>
#include <system_error>
namespace Echoion::Core
{
// Archive a non-empty active log into <directory>/history and prune the
// oldest archives. This is intentionally performed before opening the
// logger so every process start gets a fresh active file.
[[nodiscard]] std::error_code
rotateLogOnStartup(const std::filesystem::path& activeLog,
std::size_t maxFiles) noexcept;
} // namespace Echoion::Core