fix logger creating file when logging to file disabled
parent
f1cb6f05f5
commit
2a5314be57
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue