Skip to content

Commit

Permalink
Remove unused mode argument
Browse files Browse the repository at this point in the history
  • Loading branch information
elsid committed Jul 13, 2024
1 parent 6d43aed commit ea84d1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions components/debug/debugging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,11 @@ Misc::Locked<std::ostream&> getLockedRawStderr()
return Misc::Locked<std::ostream&>(*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);

Expand Down
4 changes: 2 additions & 2 deletions components/debug/debugging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ std::ostream& getRawStderr();

Misc::Locked<std::ostream&> 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);

Expand Down

0 comments on commit ea84d1c

Please sign in to comment.