[+] Added a random id (u8) to log filenames

This commit is contained in:
Reece Wilson 2023-12-09 19:56:00 +00:00
parent fe529b31da
commit 9ba725973f

View File

@ -181,10 +181,11 @@ namespace Aurora::Logging::Sinks
AuString path;
auto tm = Time::ToCivilTime(Time::CurrentClockMS());
path = fmt::format("{}/{:04}-{:02}-{:02}T{:02}-{:02}-{:02}Z.{}",
path = fmt::format("{}/{:04}-{:02}-{:02}T{:02}-{:02}-{:02}Z ({}).{}",
baseDirectory,
tm.year, tm.mon + 1, tm.mday + 1,
tm.hour, tm.min, tm.sec,
AuRNG::RngByte(),
bBinary ? "log" : "txt");
CleanupOldLogs(meta, baseDirectory);