mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Fix logging if network down (#11373)
This commit is contained in:
parent
3d3c77972d
commit
ff7a911e45
@ -2125,7 +2125,7 @@ void SyslogAsync(bool refresh) {
|
||||
static uint32_t syslog_host_hash = 0; // Syslog host name hash
|
||||
static uint32_t index = 1;
|
||||
|
||||
if (!TasmotaGlobal.syslog_level) { return; }
|
||||
if (!TasmotaGlobal.syslog_level || TasmotaGlobal.global_state.network_down) { return; }
|
||||
if (refresh && !NeedLogRefresh(TasmotaGlobal.syslog_level, index)) { return; }
|
||||
|
||||
char* line;
|
||||
|
@ -311,7 +311,7 @@ void MqttUnsubscribe(const char *topic) {
|
||||
void MqttPublishLoggingAsync(bool refresh) {
|
||||
static uint32_t index = 1;
|
||||
|
||||
if (!Settings.mqttlog_level || !Settings.flag.mqtt_enabled) { return; } // SetOption3 - Enable MQTT
|
||||
if (!Settings.mqttlog_level || !Settings.flag.mqtt_enabled || !Mqtt.connected) { return; } // SetOption3 - Enable MQTT
|
||||
if (refresh && !NeedLogRefresh(Settings.mqttlog_level, index)) { return; }
|
||||
|
||||
char* line;
|
||||
|
Loading…
x
Reference in New Issue
Block a user