fix esp8266 syslog

This commit is contained in:
arovak 2020-11-11 18:26:49 +01:00
parent 01fa5eedaf
commit cd8d12d40d
5 changed files with 7 additions and 7 deletions

View File

@ -425,9 +425,9 @@ static void debugPrintTag(uint8_t tag, Print * _logOutput)
void debugPrintPrefix(uint8_t tag, int level, Print * _logOutput)
{
#if HASP_USE_SYSLOG > 0
if(!syslogClient) return;
// if(!syslogClient) return;
if(_logOutput == syslogClient) {
if(_logOutput == syslogClient && syslogClient) {
syslogClient->beginPacket(debugSyslogHost, debugSyslogPort);
// IETF Doc: https://tools.ietf.org/html/rfc5424 - The Syslog Protocol

View File

@ -244,7 +244,7 @@ void webHandleRoot()
httpMessage +=
F("<p><form method='get' action='screenshot'><button type='submit'>Screenshot</button></form></p>");
httpMessage +=
PSTR("<p><form method='get' action='config'><button type='submit'>Configuration</button></form></p>");
F("<p><form method='get' action='config'><button type='submit'>Configuration</button></form></p>");
httpMessage +=
F("<p><form method='get' action='firmware'><button type='submit'>Firmware Upgrade</button></form></p>");

View File

@ -438,8 +438,8 @@ void mqttReconnect()
snprintf_P(buffer, sizeof(buffer), PSTR("%sstatus"), mqttNodeTopic);
mqttClient.publish(buffer, mqttFirstConnect ? "OFF" : "ON", true); //, 1);
Log.notice(TAG_MQTT, F("binary_sensor state: [%sstatus] : %s"), mqttNodeTopic,
mqttFirstConnect ? PSTR("OFF") : PSTR("ON"));
Log.notice(TAG_MQTT, F("binary_sensor state: [%sstatus] : %S"), mqttNodeTopic,
mqttFirstConnect ? F("OFF") : F("ON"));
/* snprintf_P(buffer, sizeof(buffer), PSTR("binary_sensor state: [%sstatus] : %s"), mqttNodeTopic,
mqttFirstConnect ? PSTR("OFF") : PSTR("ON"));

View File

@ -59,7 +59,7 @@ void wifiConnected(IPAddress ipaddress)
#endif
Log.verbose(TAG_WIFI, F("Connected = %s"), WiFi.status() == WL_CONNECTED ? PSTR("yes") : PSTR("no"));
haspProgressVal(255);
debugSetup();
// if(isConnected) {
// mqttReconnect();
// haspReconnect();

View File

@ -57,7 +57,7 @@ void setup()
#endif
// The network stack needs to be initialized before calling debugSetup, cause syslog needs lwip
debugSetup();
// debugSetup();
guiSetup();
if(!oobeSetup()) {