Add option to save logfiles seperate for each game (#2504)

* add option to split log

* better naming

* fix

* fix

* fix formatting

* fix misspelling

* make clang conform

* clang fix
This commit is contained in:
Fire Cube 2025-02-23 21:30:11 +01:00 committed by GitHub
parent 84a614dddc
commit c38e1635ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 108 additions and 76 deletions

View file

@ -139,8 +139,9 @@ public:
std::filesystem::create_directory(log_dir);
Filter filter;
filter.ParseFilterString(Config::getLogFilter());
instance = std::unique_ptr<Impl, decltype(&Deleter)>(new Impl(log_dir / LOG_FILE, filter),
Deleter);
const auto& log_file_path = log_file.empty() ? LOG_FILE : log_file;
instance = std::unique_ptr<Impl, decltype(&Deleter)>(
new Impl(log_dir / log_file_path, filter), Deleter);
initialization_in_progress_suppress_logging = false;
}