refactored check if logfile is enabled. error messages always get logged now

This commit is contained in:
CaCO3
2022-10-27 10:44:28 +02:00
parent ca45d0a278
commit f4ae688527
8 changed files with 8 additions and 23 deletions

View File

@@ -120,7 +120,7 @@ void ClassLogFile::WriteToDedicatedFile(std::string _fn, esp_log_level_t level,
std::string zwtime;
std::string logline = "";
if (!doLogFile){
if (!doLogFile && level != ESP_LOG_ERROR){ // Only write to file if logfile is enabled or its an error message
return;
}