From 2c669b7f5a55f8acceb4b8da9163d3b6ac4fb436 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Mon, 14 Aug 2023 20:19:10 -0600 Subject: [PATCH] log: ensure the `log/` directory exists (#2904) --- common/log/log.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/log/log.cpp b/common/log/log.cpp index 48b62aff8..9b98cda2e 100644 --- a/common/log/log.cpp +++ b/common/log/log.cpp @@ -128,6 +128,7 @@ void set_file(const std::string& filename, } else { file_path = file_util::get_file_path({"log", filename}); } + file_util::create_dir_if_needed_for_file(file_path); std::string complete_filename = file_path; if (should_rotate) { complete_filename += "." + str_util::current_local_timestamp_no_colons() + ".log";