mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 08:49:52 +03:00
compiling with EMSESP_DEBUG only sends to DEBUG log
This commit is contained in:
@@ -126,7 +126,6 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {
|
||||
emsesp::EMSESP::logger().err(error);
|
||||
api_fails_++;
|
||||
} else {
|
||||
// emsesp::EMSESP::logger().debug("API command called successfully");
|
||||
// if there was no json output from the call, default to the output message 'OK'.
|
||||
if (!output.size()) {
|
||||
output["message"] = "OK";
|
||||
|
||||
@@ -188,7 +188,7 @@ void WebDataService::device_data(AsyncWebServerRequest * request, JsonVariant &
|
||||
|
||||
#if defined(EMSESP_DEBUG)
|
||||
size_t length = response->setLength();
|
||||
EMSESP::logger().debug("[DEBUG] Dashboard buffer used: %d", length);
|
||||
EMSESP::logger().debug("Dashboard buffer used: %d", length);
|
||||
#else
|
||||
response->setLength();
|
||||
#endif
|
||||
@@ -245,7 +245,9 @@ void WebDataService::write_value(AsyncWebServerRequest * request, JsonVariant &
|
||||
if (return_code != CommandRet::OK) {
|
||||
EMSESP::logger().err("Write command failed %s (%s)", (const char *)output["message"], Command::return_code_string(return_code).c_str());
|
||||
} else {
|
||||
#if defined(EMSESP_DEBUG)
|
||||
EMSESP::logger().debug("Write command successful");
|
||||
#endif
|
||||
}
|
||||
|
||||
response->setCode((return_code == CommandRet::OK) ? 200 : 204);
|
||||
|
||||
Reference in New Issue
Block a user