removed redundant log entries (some now are DEBUG isntread of INFO or ERROR)

This commit is contained in:
George Ruinelli
2022-10-21 23:19:36 +02:00
parent 0bf8182728
commit 4951fc9b80
10 changed files with 5 additions and 24 deletions

View File

@@ -548,8 +548,7 @@ bool ClassFlowCNNGeneral::getNetworkParameter()
zwcnn = FormatFileName(zwcnn);
ESP_LOGD(TAG, "%s", zwcnn.c_str());
if (!tflite->LoadModel(zwcnn)) {
ESP_LOGD(TAG, "Can't read model file /sdcard%s", cnnmodelfile.c_str());
LogFile.WriteToFile("Cannot load model");
LogFile.WriteToFile("Can't read model file /sdcard%s", cnnmodelfile.c_str());
delete tflite;
return false;
}
@@ -617,8 +616,7 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time)
zwcnn = FormatFileName(zwcnn);
ESP_LOGD(TAG, "%s", zwcnn.c_str());
if (!tflite->LoadModel(zwcnn)) {
ESP_LOGD(TAG, "Can't read model file /sdcard%s", cnnmodelfile.c_str());
LogFile.WriteToFile("Cannot load model");
LogFile.WriteToFile("Can't read model file /sdcard%s", cnnmodelfile.c_str());
delete tflite;
return false;
@@ -804,8 +802,7 @@ bool ClassFlowCNNGeneral::doNeuralNetwork(string time)
GENERAL[_ana]->ROI[i]->isReject = true;
result = -1;
_result_save_file+= 100; // Für den Fall, dass fit nicht ausreichend, soll trotzdem das Ergebnis mit "-10x.y" abgespeichert werden.
string zw = "Value Rejected due to Threshold (Fit: " + to_string(_fit) + "Threshold: " + to_string(CNNGoodThreshold);
ESP_LOGD(TAG, "Value Rejected due to Threshold (Fit: %f, Threshold: %f", _fit, CNNGoodThreshold);
string zw = "Value Rejected due to Threshold (Fit: " + to_string(_fit) + "Threshold: " + to_string(CNNGoodThreshold) + ")";
LogFile.WriteToFile(zw);
}
else

View File

@@ -493,9 +493,8 @@ bool ClassFlowControll::ReadParameter(FILE* pfile, string& aktparamgraph)
{
// reboot notwendig damit die neue wlan.ini auch benutzt wird !!!
fclose(pfile);
ESP_LOGD(TAG, "do reboot");
LogFile.SwitchOnOff(true);
LogFile.WriteToFile("Reboot to activate new HOSTNAME.");
LogFile.WriteToFile("Rebooting to activate new HOSTNAME...");
esp_restart();
hard_restart();
doReboot();

View File

@@ -47,7 +47,6 @@ string ClassFlowImage::CreateLogFolder(string time) {
string logPath = LogImageLocation + "/" + time.LOGFILE_TIME_FORMAT_DATE_EXTR + "/" + time.LOGFILE_TIME_FORMAT_HOUR_EXTR;
isLogImage = mkdir_r(logPath.c_str(), S_IRWXU) == 0;
if (!isLogImage) {
ESP_LOGW(logTag, "Can't create log folder for analog images. Path %s", logPath.c_str());
LogFile.WriteToFile("Can't create log folder for analog images. Path " + logPath);
}
@@ -129,7 +128,6 @@ void ClassFlowImage::RemoveOldLogs()
}
}
}
ESP_LOGI(logTag, "%d image folder deleted. %d image folder not deleted.", deleted, notDeleted);
LogFile.WriteToFile("Image folder deleted: " + std::to_string(deleted) + ". Image folder not deleted: " + std::to_string(notDeleted));
closedir(dir);
}