diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index a107584407..06c749e032 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -383,12 +383,11 @@ Misc::Locked getLockedRawStderr() return Misc::Locked(*rawStderrMutex, getRawStderr()); } -// Redirect cout and cerr to the log file -void setupLogging(const std::filesystem::path& logDir, std::string_view appName, std::ios_base::openmode mode) +void setupLogging(const std::filesystem::path& logDir, std::string_view appName) { #if !(defined(_WIN32) && defined(_DEBUG)) const std::string logName = Misc::StringUtils::lowerCase(appName) + ".log"; - logfile.open(logDir / logName, mode); + logfile.open(logDir / logName, std::ios::out); Debug::Identity log(logfile); diff --git a/components/debug/debugging.hpp b/components/debug/debugging.hpp index 6700b5b761..9e375de3d7 100644 --- a/components/debug/debugging.hpp +++ b/components/debug/debugging.hpp @@ -35,8 +35,8 @@ std::ostream& getRawStderr(); Misc::Locked getLockedRawStderr(); -void setupLogging( - const std::filesystem::path& logDir, std::string_view appName, std::ios_base::openmode mode = std::ios::out); +// Redirect cout and cerr to the log file +void setupLogging(const std::filesystem::path& logDir, std::string_view appName); int wrapApplication(int (*innerApplication)(int argc, char* argv[]), int argc, char* argv[], std::string_view appName);