mirror of https://github.com/arendst/Tasmota.git
Add masterlog_level to control master log level control
This commit is contained in:
parent
feb5ffc3dd
commit
a5857ac03f
|
@ -1784,8 +1784,9 @@ void Syslog(void)
|
||||||
|
|
||||||
void AddLog(uint32_t loglevel)
|
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);
|
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) {
|
if (loglevel <= seriallog_level) {
|
||||||
|
|
|
@ -144,6 +144,7 @@ uint8_t light_type = 0; // Light types
|
||||||
uint8_t serial_in_byte; // Received byte
|
uint8_t serial_in_byte; // Received byte
|
||||||
uint8_t ota_retry_counter = OTA_ATTEMPTS; // OTA retry counter
|
uint8_t ota_retry_counter = OTA_ATTEMPTS; // OTA retry counter
|
||||||
uint8_t devices_present = 0; // Max number of devices supported
|
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 seriallog_level; // Current copy of Settings.seriallog_level
|
||||||
uint8_t syslog_level; // Current copy of Settings.syslog_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
|
uint8_t my_module_type; // Current copy of Settings.module or user template type
|
||||||
|
|
Loading…
Reference in New Issue