mirror of https://github.com/arendst/Tasmota.git
Add MqttLog to my_user_config.h and status 3
Add MqttLog to my_user_config.h and status 3 (#6498)
This commit is contained in:
parent
aa0e7c50ec
commit
22dbe597a2
|
@ -81,6 +81,7 @@
|
|||
#define SYS_LOG_LEVEL LOG_LEVEL_NONE // [SysLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
||||
#define SERIAL_LOG_LEVEL LOG_LEVEL_INFO // [SerialLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
||||
#define WEB_LOG_LEVEL LOG_LEVEL_INFO // [WebLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
||||
#define MQTT_LOG_LEVEL LOG_LEVEL_NONE // [MqttLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
||||
|
||||
// -- Ota -----------------------------------------
|
||||
#define OTA_URL "http://thehackbox.org/tasmota/release/sonoff.bin" // [OtaUrl]
|
||||
|
|
|
@ -678,6 +678,7 @@ void SettingsDefaultSet2(void)
|
|||
Settings.mqtt_fingerprint[1][i] = strtol(p, &p, 16);
|
||||
}
|
||||
Settings.tele_period = TELE_PERIOD;
|
||||
Settings.mqttlog_level = MQTT_LOG_LEVEL;
|
||||
|
||||
// Energy
|
||||
Settings.flag2.current_resolution = 3;
|
||||
|
|
|
@ -368,10 +368,10 @@ void CmndStatus(void)
|
|||
}
|
||||
|
||||
if ((0 == payload) || (3 == payload)) {
|
||||
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS3_LOGGING "\":{\"" D_CMND_SERIALLOG "\":%d,\"" D_CMND_WEBLOG "\":%d,\"" D_CMND_SYSLOG "\":%d,\""
|
||||
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS3_LOGGING "\":{\"" D_CMND_SERIALLOG "\":%d,\"" D_CMND_WEBLOG "\":%d,\"" D_CMND_MQTTLOG "\":%d,\"" D_CMND_SYSLOG "\":%d,\""
|
||||
D_CMND_LOGHOST "\":\"%s\",\"" D_CMND_LOGPORT "\":%d,\"" D_CMND_SSID "\":[\"%s\",\"%s\"],\"" D_CMND_TELEPERIOD "\":%d,\""
|
||||
D_JSON_RESOLUTION "\":\"%08X\",\"" D_CMND_SETOPTION "\":[\"%08X\",\"%s\",\"%08X\"]}}"),
|
||||
Settings.seriallog_level, Settings.weblog_level, Settings.syslog_level,
|
||||
Settings.seriallog_level, Settings.weblog_level, Settings.mqttlog_level, Settings.syslog_level,
|
||||
Settings.syslog_host, Settings.syslog_port, Settings.sta_ssid[0], Settings.sta_ssid[1], Settings.tele_period,
|
||||
Settings.flag2.data, Settings.flag.data, ToHex_P((unsigned char*)Settings.param, PARAM8_SIZE, stemp2, sizeof(stemp2)), Settings.flag3.data);
|
||||
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "3"));
|
||||
|
|
|
@ -1648,7 +1648,7 @@ void LoggingSaveSettings(void)
|
|||
WebGetArg("l1", tmp, sizeof(tmp));
|
||||
Settings.weblog_level = (!strlen(tmp)) ? WEB_LOG_LEVEL : atoi(tmp);
|
||||
WebGetArg("l2", tmp, sizeof(tmp));
|
||||
Settings.mqttlog_level = (!strlen(tmp)) ? WEB_LOG_LEVEL : atoi(tmp);
|
||||
Settings.mqttlog_level = (!strlen(tmp)) ? MQTT_LOG_LEVEL : atoi(tmp);
|
||||
WebGetArg("l3", tmp, sizeof(tmp));
|
||||
SetSyslog((!strlen(tmp)) ? SYS_LOG_LEVEL : atoi(tmp));
|
||||
WebGetArg("lh", tmp, sizeof(tmp));
|
||||
|
|
Loading…
Reference in New Issue