From 4dc4c553ba50cdc3d282701906380b7643f9d972 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Mon, 27 Jul 2026 08:41:31 +0200 Subject: [PATCH] Core: SteLogSetup with fileptr=nullptr now sets the default location. --- uppsrc/Core/Log.cpp | 2 ++ uppsrc/Core/src.tpp/Logging_en-us.tpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/uppsrc/Core/Log.cpp b/uppsrc/Core/Log.cpp index 3a178b095..fbd92b514 100644 --- a/uppsrc/Core/Log.cpp +++ b/uppsrc/Core/Log.cpp @@ -411,6 +411,8 @@ void StdLogSetup(dword options, const char *filepath, int filesize_limit) sLog.sizelimit = filesize_limit; if(filepath) strcpy(sLog.filepath, filepath); + else + SyncLogPath__(); ReopenLog(); } diff --git a/uppsrc/Core/src.tpp/Logging_en-us.tpp b/uppsrc/Core/src.tpp/Logging_en-us.tpp index 376c156bc..104aa99c9 100644 --- a/uppsrc/Core/src.tpp/Logging_en-us.tpp +++ b/uppsrc/Core/src.tpp/Logging_en-us.tpp @@ -78,6 +78,9 @@ cannot be used to e.g. LOG inside heap routines).] conversion of UTF8 characters, at the price of using heap (so cannot be used to e.g. LOG inside heap routines).]}}&] [s3; &] +[s2; If [%-*@3 filepath] is nullptr, the path is set to the default +location.&] +[s3; &] [s4;%- &] [s5;:StdLog`(`):%- [_^Stream^ Stream][@(0.0.255) `&]_[* StdLog]()&] [s2; Returns a reference to standard log stream.&]