Log cleanups (#5135)

* Log cleanups

change log levels, shorten log messages, delete commented out logs

* Address comments from review

* Remove full stops

* EDEBUG --> DEBUG
This commit is contained in:
Tom Fifield
2024-11-04 20:09:23 +08:00
committed by GitHub
parent a628c93125
commit 276067065e
34 changed files with 176 additions and 248 deletions

View File

@@ -103,7 +103,7 @@ bool NAU7802Sensor::saveCalibrationData()
nau7802config.calibrationFactor = nau7802.getCalibrationFactor();
bool okay = false;
LOG_INFO("%s state write to %s.", sensorName, nau7802ConfigFileName);
LOG_INFO("%s state write to %s", sensorName, nau7802ConfigFileName);
pb_ostream_t stream = {&writecb, static_cast<Print *>(&file), meshtastic_Nau7802Config_size};
if (!pb_encode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) {
@@ -121,7 +121,7 @@ bool NAU7802Sensor::loadCalibrationData()
auto file = FSCom.open(nau7802ConfigFileName, FILE_O_READ);
bool okay = false;
if (file) {
LOG_INFO("%s state read from %s.", sensorName, nau7802ConfigFileName);
LOG_INFO("%s state read from %s", sensorName, nau7802ConfigFileName);
pb_istream_t stream = {&readcb, &file, meshtastic_Nau7802Config_size};
if (!pb_decode(&stream, &meshtastic_Nau7802Config_msg, &nau7802config)) {
LOG_ERROR("Error: can't decode protobuf %s", PB_GET_ERROR(&stream));
@@ -132,9 +132,9 @@ bool NAU7802Sensor::loadCalibrationData()
}
file.close();
} else {
LOG_INFO("No %s state found (File: %s).", sensorName, nau7802ConfigFileName);
LOG_INFO("No %s state found (File: %s)", sensorName, nau7802ConfigFileName);
}
return okay;
}
#endif
#endif