| 10 | namespace OpenLoco::Diagnostics::Logging |
| 11 | { |
| 12 | LogFile::LogFile(const fs::path& file) |
| 13 | { |
| 14 | // Ensure the directory exists in case the filepath is a relative path and contains a sub directory. |
| 15 | fs::create_directories(file.parent_path()); |
| 16 | |
| 17 | _file.open(file, std::ios::binary | std::ios::app); |
| 18 | } |
| 19 | |
| 20 | void LogFile::print(Level level, std::string_view message) |
| 21 | { |