util/file: cleanup log initialization and some file-util functions (#2299)

Fixes both issues mentioned in #2297
This commit is contained in:
Tyler Wilding
2023-03-01 17:52:33 -05:00
committed by GitHub
parent 43da4088e6
commit bc40fc5d2f
9 changed files with 76 additions and 32 deletions
+6 -2
View File
@@ -290,8 +290,12 @@ int main(int argc, char** argv) {
}
}
auto log_path = file_util::get_jak_project_dir() / "extractor.log";
lg::set_file(log_path.string());
try {
lg::set_file(file_util::get_file_path({"log", "extractor.log"}));
} catch (const std::exception& e) {
lg::error("Failed to setup logging: {}", e.what());
return 1;
}
fs::path iso_data_path;