added DEBUG around logger().debug to prevent 'undefined' showing in log

This commit is contained in:
Proddy
2024-02-04 14:52:12 +01:00
parent 8406657906
commit ae7f0445a3

View File

@@ -347,7 +347,9 @@ bool WebSchedulerService::command(const char * cmd, const char * data) {
uint8_t return_code = Command::process(command_str, true, input, output); // admin set uint8_t return_code = Command::process(command_str, true, input, output); // admin set
if (return_code == CommandRet::OK) { if (return_code == CommandRet::OK) {
EMSESP::logger().debug("Scheduled command %s with data %s successfully", cmd, data); #if defined(EMSESP_DEBUG)
EMSESP::logger().debug("Scheduled command '%s' with data '%s' was successful", cmd, data);
#endif
if (strlen(data) == 0 && output.size()) { if (strlen(data) == 0 && output.size()) {
Mqtt::queue_publish("response", output); Mqtt::queue_publish("response", output);
} }