mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-04-20 22:05:11 +00:00
Merge pull request #21 from yo8ssq/main
RFC5424 The Syslog Protocol - standardizing I-gate log output
This commit is contained in:
commit
2312eada2c
1 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ WiFiUDP udpClient;
|
|||
namespace SYSLOG_Utils {
|
||||
|
||||
void log(String type, String packet, int rssi, float snr, int freqError) {
|
||||
String syslogPacket = Config.callsign + " LoRa / ";
|
||||
String syslogPacket = "<165>1 - " + Config.callsign + " LoRa" + " - - - "; //RFC5424 The Syslog Protocol
|
||||
if (Config.syslog.active && (stationMode==1 || stationMode==2 || (stationMode==5 && WiFi.status()==WL_CONNECTED))) {
|
||||
if (type == "APRSIS Tx") {
|
||||
if (packet.indexOf(":>") > 10) {
|
||||
|
|
@ -55,7 +55,7 @@ namespace SYSLOG_Utils {
|
|||
syslogPacket += type + " / " + packet;
|
||||
}
|
||||
} else {
|
||||
syslogPacket = "ERROR / Error in Syslog Packet";
|
||||
syslogPacket = "<165>1 - ERROR LoRa - - - ERROR / Error in Syslog Packet"; //RFC5424 The Syslog Protocol
|
||||
}
|
||||
udpClient.beginPacket(Config.syslog.server.c_str(), Config.syslog.port);
|
||||
udpClient.write((const uint8_t*)syslogPacket.c_str(), syslogPacket.length());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue