mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 01:39:54 +03:00
Merge pull request #1368 from proddy/dev
use DEBUG logging for commands with json output - #1364
This commit is contained in:
@@ -17,10 +17,10 @@ core_build_flags =
|
|||||||
-D NDEBUG
|
-D NDEBUG
|
||||||
-D ARDUINO_ARCH_ESP32=1
|
-D ARDUINO_ARCH_ESP32=1
|
||||||
-D ESP32=1
|
-D ESP32=1
|
||||||
-std=gnu++17
|
; -std=gnu++17
|
||||||
|
|
||||||
core_unbuild_flags = -std=gnu++11
|
; core_unbuild_flags = -std=gnu++11
|
||||||
; core_unbuild_flags =
|
core_unbuild_flags =
|
||||||
|
|
||||||
; my_build_flags is set in pio_local.ini
|
; my_build_flags is set in pio_local.ini
|
||||||
my_build_flags =
|
my_build_flags =
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char *
|
|||||||
snprintf(info_s, sizeof(info_s), "'%s/%s'", dname, cmd);
|
snprintf(info_s, sizeof(info_s), "'%s/%s'", dname, cmd);
|
||||||
}
|
}
|
||||||
if ((value == nullptr) || (strlen(value) == 0)) {
|
if ((value == nullptr) || (strlen(value) == 0)) {
|
||||||
LOG_INFO(("%sCalling command %s"), ro.c_str(), info_s);
|
LOG_DEBUG(("%sCalling command %s"), ro.c_str(), info_s);
|
||||||
} else {
|
} else {
|
||||||
if (id > 0) {
|
if (id > 0) {
|
||||||
LOG_INFO(("%sCalling command %s with value %s and id %d on device 0x%02X"), ro.c_str(), info_s, value, id, device_id);
|
LOG_INFO(("%sCalling command %s with value %s and id %d on device 0x%02X"), ro.c_str(), info_s, value, id, device_id);
|
||||||
|
|||||||
@@ -111,9 +111,11 @@ void Shower::loop() {
|
|||||||
char dt[25];
|
char dt[25];
|
||||||
strftime(dt, sizeof(dt), "%FT%T%z", tm_);
|
strftime(dt, sizeof(dt), "%FT%T%z", tm_);
|
||||||
doc["timestamp"] = dt;
|
doc["timestamp"] = dt;
|
||||||
|
LOG_INFO("shower finished (duration %s)", dt);
|
||||||
|
} else {
|
||||||
|
LOG_INFO("shower finished (duration %lu s)", duration_);
|
||||||
}
|
}
|
||||||
Mqtt::queue_publish("shower_data", doc.as<JsonObject>());
|
Mqtt::queue_publish("shower_data", doc.as<JsonObject>());
|
||||||
LOG_INFO("finished with duration %lu seconds", duration_);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user