From fe4c512839f9f613fc5098e5a9d8c9a402e60aa0 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 10 May 2023 11:57:48 +0100 Subject: Rename duration to timeutils and relocate InspIRCd::TimeString. --- src/logging.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/logging.cpp') diff --git a/src/logging.cpp b/src/logging.cpp index 8dbc156be..11505ccb4 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -19,6 +19,7 @@ #include "inspircd.h" #include "clientprotocolmsg.h" +#include "timeutils.h" const char* Log::LevelToString(Log::Level level) { @@ -74,7 +75,7 @@ void Log::FileMethod::OnLog(time_t time, Level level, const std::string& type, c if (prevtime != time) { prevtime = time; - timestr = InspIRCd::TimeString(prevtime); + timestr = Time::ToString(prevtime); } fputs(timestr.c_str(), file); @@ -123,7 +124,7 @@ Log::MethodPtr Log::FileEngine::Create(const std::shared_ptr& tag) if (target.empty()) throw CoreException(" must be specified for file logger at " + tag->source.str()); - const std::string fulltarget = ServerInstance->Config->Paths.PrependLog(InspIRCd::TimeString(ServerInstance->Time(), target.c_str())); + const std::string fulltarget = ServerInstance->Config->Paths.PrependLog(Time::ToString(ServerInstance->Time(), target.c_str())); auto* fh = fopen(fulltarget.c_str(), "a"); if (!fh) { -- cgit v1.3.1-10-gc9f91