Skip to content

Commit

Permalink
dumps log files into build/logs (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
jazonshou authored Nov 19, 2024
1 parent cc5e422 commit 8c5bcbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Rover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ void parseCommandLine(int argc, char** argv) {
const auto now = std::chrono::system_clock::now();
const std::time_t t_c = std::chrono::system_clock::to_time_t(now);
std::stringstream ss;
ss << std::put_time(std::localtime(&t_c), "%Y%m%d_%H%M%S.log");
ss << "logs/" << std::put_time(std::localtime(&t_c), "%Y%m%d_%H%M%S.log");
std::string logFileName = ss.str();
loguru::add_file("latest.log", loguru::Truncate, loguru::Verbosity_INFO);
loguru::add_file("logs/latest.log", loguru::Truncate, loguru::Verbosity_INFO);
loguru::add_file(logFileName.c_str(), loguru::Append, loguru::Verbosity_INFO);

program.parse_args(argc, argv);
Expand Down

0 comments on commit 8c5bcbe

Please sign in to comment.