From 0624ee1ca329bcf51b8fac81a467cf9d7ad42b44 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 23 Dec 2020 10:56:21 +0100 Subject: [PATCH] Add logging quick exit code --- tasmota/support.ino | 1 + tasmota/xdrv_02_mqtt.ino | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/support.ino b/tasmota/support.ino index 85840fb8a..d121c5eea 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1927,6 +1927,7 @@ void Syslog(void) void SyslogAsync(bool refresh) { static uint32_t index = 1; + if (!TasmotaGlobal.syslog_level) { return; } if (refresh && !NeedLogRefresh(TasmotaGlobal.syslog_level, index)) { return; } char* line; diff --git a/tasmota/xdrv_02_mqtt.ino b/tasmota/xdrv_02_mqtt.ino index a91e801e2..7e46058ca 100644 --- a/tasmota/xdrv_02_mqtt.ino +++ b/tasmota/xdrv_02_mqtt.ino @@ -294,7 +294,7 @@ void MqttUnsubscribe(const char *topic) void MqttPublishLoggingAsync(bool refresh) { static uint32_t index = 1; - if (!Settings.flag.mqtt_enabled) { return; } // SetOption3 - Enable MQTT + if (!Settings.mqttlog_level || !Settings.flag.mqtt_enabled) { return; } // SetOption3 - Enable MQTT if (refresh && !NeedLogRefresh(Settings.mqttlog_level, index)) { return; } char* line;