16 lines
474 B
C++
16 lines
474 B
C++
#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
|