From 9b514e53388a22458ef4c1bbe6ad975f49548463 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Wed, 29 Dec 2021 00:42:44 +0100 Subject: Make timestamp year-month-day instead of day-month-year --- NorthstarDedicatedTest/logging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'NorthstarDedicatedTest') diff --git a/NorthstarDedicatedTest/logging.cpp b/NorthstarDedicatedTest/logging.cpp index 09ae6961..fb5a11fc 100644 --- a/NorthstarDedicatedTest/logging.cpp +++ b/NorthstarDedicatedTest/logging.cpp @@ -176,12 +176,12 @@ void InitialiseLogging() spdlog::flush_on(spdlog::level::info); // log file stuff - // generate log file, format should be nslog%d-%m-%Y %H-%M-%S.txt in gamedir/R2Northstar/logs + // generate log file, format should be nslog%Y-%m-%d %H-%M-%S.txt in gamedir/R2Northstar/logs // todo: might be good to delete logs that are too old time_t time = std::time(nullptr); tm currentTime = *std::localtime(&time); std::stringstream stream; - stream << std::put_time(¤tTime, "R2Northstar/logs/nslog%d-%m-%Y %H-%M-%S.txt"); + stream << std::put_time(¤tTime, "R2Northstar/logs/nslog%Y-%m-%d %H-%M-%S.txt"); // create logger spdlog::default_logger()->sinks().push_back(std::make_shared(stream.str(), false)); -- cgit v1.2.3