LSP: OpenGOAL Feature Support - Part 1 (#2668)

This commit is contained in:
Tyler Wilding
2023-05-21 16:24:23 -05:00
committed by GitHub
parent d5951c2b11
commit 057ae361bf
109 changed files with 8032 additions and 7956 deletions
+6 -2
View File
@@ -111,7 +111,7 @@ void log_print(const char* message) {
// how many extra log files for a single program should be kept?
constexpr int LOG_ROTATE_MAX = 5;
void set_file(const std::string& filename, const bool should_rotate) {
void set_file(const std::string& filename, const bool should_rotate, const bool append) {
ASSERT(!gLogger.fp);
file_util::create_dir_if_needed_for_file(filename);
@@ -133,7 +133,11 @@ void set_file(const std::string& filename, const bool should_rotate) {
}
}
gLogger.fp = file_util::open_file(filename.c_str(), "w");
if (append) {
gLogger.fp = file_util::open_file(filename.c_str(), "a");
} else {
gLogger.fp = file_util::open_file(filename.c_str(), "w");
}
ASSERT(gLogger.fp);
}