diff --git a/tasmota/support.ino b/tasmota/support.ino index 2e36793b0..169bf2005 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1784,8 +1784,9 @@ void Syslog(void) void AddLog(uint32_t loglevel) { - char mxtime[10]; // "13:45:21 " + if ((masterlog_level > 0) && (loglevel < masterlog_level)) { return; } + char mxtime[10]; // "13:45:21 " snprintf_P(mxtime, sizeof(mxtime), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d "), RtcTime.hour, RtcTime.minute, RtcTime.second); if (loglevel <= seriallog_level) { diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 43e019e33..0fca0cddc 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -144,6 +144,7 @@ uint8_t light_type = 0; // Light types uint8_t serial_in_byte; // Received byte uint8_t ota_retry_counter = OTA_ATTEMPTS; // OTA retry counter uint8_t devices_present = 0; // Max number of devices supported +uint8_t masterlog_level = 0; // Master log level used to override set log level uint8_t seriallog_level; // Current copy of Settings.seriallog_level uint8_t syslog_level; // Current copy of Settings.syslog_level uint8_t my_module_type; // Current copy of Settings.module or user template type