diff --git a/src/blt/std/logging.cpp b/src/blt/std/logging.cpp index c6e29a3..b9bade2 100644 --- a/src/blt/std/logging.cpp +++ b/src/blt/std/logging.cpp @@ -102,7 +102,8 @@ namespace blt::logging { void init(LOG_PROPERTIES properties) { if (BLT_LOGGING_PROPERTIES.m_directory != properties.m_directory) writer = LogFileWriter{properties.m_directory}; - std::filesystem::create_directory(properties.m_directory); + if (properties.m_logToFile) + std::filesystem::create_directory(properties.m_directory); BLT_LOGGING_PROPERTIES = properties; }