mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-04-05 00:33:39 +02:00
Feature: Add syslog logger
This implements RFC5424 version of the protocol. Doesn't use https://github.com/arcao/Syslog since the protocol itself is trivial and most of the libraries functionality is not needed here. The library also doesn't support setting the PROCID field, which is set to a random id to indicate a reboot here. Adds UI for syslog configuration to network admin view.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
#include "NetworkSettings.h"
|
||||
#include "Configuration.h"
|
||||
#include "SyslogLogger.h"
|
||||
#include "PinMapping.h"
|
||||
#include "Utils.h"
|
||||
#include "__compiled_constants.h"
|
||||
@@ -57,6 +58,8 @@ void NetworkSettingsClass::init(Scheduler& scheduler)
|
||||
|
||||
scheduler.addTask(_loopTask);
|
||||
_loopTask.enable();
|
||||
|
||||
Syslog.init(scheduler);
|
||||
}
|
||||
|
||||
void NetworkSettingsClass::NetworkEvent(const WiFiEvent_t event, WiFiEventInfo_t info)
|
||||
@@ -335,6 +338,8 @@ void NetworkSettingsClass::applyConfig()
|
||||
ESP_LOG_LEVEL_LOCAL((success ? ESP_LOG_INFO : ESP_LOG_ERROR), TAG, "Configuring WiFi %s", success ? "done" : "failed");
|
||||
|
||||
setStaticIp();
|
||||
|
||||
Syslog.updateSettings(getHostname());
|
||||
}
|
||||
|
||||
void NetworkSettingsClass::setHostname()
|
||||
|
||||
Reference in New Issue
Block a user