Replaced all of the logging with proper log levels

This commit is contained in:
Ben Meadors
2022-12-30 10:27:07 -06:00
parent 8193215294
commit f1cdfd163d
68 changed files with 519 additions and 524 deletions

View File

@@ -34,7 +34,7 @@ bool DeviceTelemetryModule::handleReceivedProtobuf(const MeshPacket &mp, Telemet
if (t->which_variant == Telemetry_device_metrics_tag) {
const char *sender = getSenderShortName(mp);
LOG_DEBUG("(Received from %s): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n",
LOG_INFO("(Received from %s): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n",
sender,
t->variant.device_metrics.air_util_tx,
t->variant.device_metrics.channel_utilization,
@@ -60,7 +60,7 @@ bool DeviceTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
t.variant.device_metrics.channel_utilization = myNodeInfo.channel_utilization;
t.variant.device_metrics.voltage = powerStatus->getBatteryVoltageMv() / 1000.0;
LOG_DEBUG("(Sending): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n",
LOG_INFO("(Sending): air_util_tx=%f, channel_utilization=%f, battery_level=%i, voltage=%f\n",
t.variant.device_metrics.air_util_tx,
t.variant.device_metrics.channel_utilization,
t.variant.device_metrics.battery_level,
@@ -74,10 +74,10 @@ bool DeviceTelemetryModule::sendTelemetry(NodeNum dest, bool phoneOnly)
lastMeasurementPacket = packetPool.allocCopy(*p);
nodeDB.updateTelemetry(nodeDB.getNodeNum(), t, RX_SRC_LOCAL);
if (phoneOnly) {
LOG_DEBUG("Sending packet to phone\n");
LOG_INFO("Sending packet to phone\n");
service.sendToPhone(p);
} else {
LOG_DEBUG("Sending packet to mesh\n");
LOG_INFO("Sending packet to mesh\n");
service.sendToMesh(p, RX_SRC_LOCAL, true);
}
return true;