Giter Site home page Giter Site logo

arcao / syslog Goto Github PK

View Code? Open in Web Editor NEW
118.0 13.0 48.0 52 KB

An Arduino library for logging to Syslog server in IETF format (RFC 5424) and BSD format (RFC 3164)

License: MIT License

C++ 100.00%
syslog arduino esp8266 arduino-library arduino-ethernet arduino-uno arduino-yun intel-galileo intel-edison arduino-mkr1000

syslog's Introduction

Syslog

An Arduino library for logging to Syslog server via UDP protocol in IETF (RFC 5424) and BSD (RFC 3164) message format

Build Status Join the chat at https://gitter.im/arcao/Syslog

How to use, see examples.

Features

  • Supports original Syslog severity level and facility constants
  • Supports both Syslog messge formats: IETF (RFC 5424) and BSD (RFC 3164)
  • Supports printf-like formatting via logf methods (use vsnprintf method inside)
  • Supports fluent interface, see AdvancedLogging example
  • Allows to ignore sending specified severity levels with logMask function, see AdvancedLogging example
  • Independent on underlying network hardware. The network hardware library has to implement methods of UDP astract class only.

Compatible Hardware

The library uses the Arduino UDP Network API (UDP class) for interacting with the underlying network hardware. This means it Just Works with a growing number of boards and shields, including:

  • ESP8266 / ESP32
  • Arduino Ethernet
  • Arduino Ethernet Shield
  • Arduino YUN – use the included BridgeUDP in place of EthernetUDP, and be sure to call a Bridge.begin() first
  • Arduino WiFi Shield
  • Intel Galileo/Edison
  • Arduino/Genuino MKR1000
  • Arduino module RTL00(RTL8710AF), F11AMIM13 (RTL8711AM)
  • ... you tell me!

Syslog message formats

This library supports both Syslog message formats IETF (RFC 5424) and BSD (RFC 3164). The newer IETF format is used by default. If you want to use older "obsolete" BSD format, just specify it with SYSLOG_PROTO_BSD constant in a last constructor parameter.

Syslog syslog(udpClient, host, port, device_hostname, app_name, default_priority, SYSLOG_PROTO_BSD);
// or
Syslog syslog(udpClient, ip, port, device_hostname, app_name, default_priority, SYSLOG_PROTO_BSD);
// or
Syslog syslog(udpClient, SYSLOG_PROTO_BSD);

Limitations

  • This library is sending empty timestamp in the syslog messages. For IETF format it is NILVALUE (char -) in TIMESTAMP field, for BSD format the TIMESTAMP field is completely ommited. Syslog server should use a time of receiving message in this case. It is OK in most cases. This issue will be fixed in some of the next releases.

syslog's People

Contributors

arcao avatar gitter-badger avatar jeremy-gill avatar per1234 avatar sysoleg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syslog's Issues

Add ability to specify appName on per log message

Hi,

use senario: I have several libraries running on the same ESP, doing a variety of things. With debugging enabled I'd like to be able to send debug messages from different bit of software on the same device. so the device name is the same, but the app name is different.

Would be great to have overloads to be able to specify the log level and app name for a message.

what do you think?

processing newline char

I use existing code to prepare my syslog messages. That code was written to send debug output to the serial port.
In the code the\ncharacter sequence is used to generate a linefeed.
The relevant code that sends a string containing the sequence \n is

    String syslogstring =  "Number of repeats\n";
    syslogstring += NrRepeats; // in this case 2
    syslog.log(LOG_INFO,syslogstring.c_str());

The output shows:
Number of repeats#0122

I solve it my replacing the \n before submitting to syslog:
syslogstring.replace("\n", " ");
The output then shows:
Number of repeats 2
So I have no problem, but I would like to know how syslog processes the \n sequence.
It was not clear from the syslog code, I must have overlooked something.

Log Level

Hello,
I have question to the Level of the Logs. I successfully send the logs to a raspberry which is recording the logs using syslog-ng.
However I don't see the log level in the log file on the raspberry.
Here the result from the ESP8266SimpleLogging.ino

Oct 14 18:59:48 192.168.0.101 1 - my-device my-app - - - This is info message no. 1
Oct 14 18:59:48 192.168.0.101 1 - my-device my-app - - - This is daemon info message no. 1
Oct 14 18:59:48 192.168.0.101 1 - my-device my-app - - - End loop
Oct 14 18:59:58 192.168.0.101 1 - my-device my-app - - - Begin loop
Oct 14 18:59:58 192.168.0.101 1 - my-device my-app - - - This is error message no. 2
Oct 14 18:59:58 192.168.0.101 1 - my-device my-app - - - This is info message no. 2
Oct 14 18:59:58 192.168.0.101 1 - my-device my-app - - - This is daemon info message no. 2
Oct 14 18:59:58 192.168.0.101 1 - my-device my-app - - - End loop

Is there a possibility to see the log level using syslog-ng?

Mixing Strings and F()?

Hello, I see that you support the F() macro.
However, in some cases it would be great to be able to mix. For example:
log("X value is " + String(X));
The statement above fails. When logging on serial i can work around the issue by having separate print + println for the two, but i cant do it with systlog.
any hint? thanks!

Using syslog right after wifi connect causes crash

When I send a syslog message directly after wifi is connected, my esp8266 crashes most of the time.
Seems to have something to do with resolving the ip based on hostname...

0x4021fbd8: memp_malloc at core/memp.c line 404
0x40220fe5: dns_check_entry at core/dns.c line 1060
0x40221558: dns_gethostbyname_addrtype at core/dns.c line 1444
0x4021466b: String::concat(char const*, unsigned int) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 288
0x40201b70: delay at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/core_esp8266_wiring.c line 46
0x402215d8: dns_gethostbyname at core/dns.c line 1472
0x4020761c: ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&, unsigned int) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp line 475
0x401006ac: realloc at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/umm_malloc/umm_malloc.c line 1645
0x402142f7: String::changeBuffer(unsigned int) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 156
0x402142f7: String::changeBuffer(unsigned int) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 156
0x4020764c: ESP8266WiFiGenericClass::hostByName(char const*, IPAddress&) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp line 452
0x40208ec9: WiFiUDP::beginPacket(char const*, unsigned short) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/ESP8266WiFi/src/WiFiUdp.cpp line 147
0x4021466b: String::concat(char const*, unsigned int) at /home/jeroen/.arduino15/packages/esp8266/hardware/esp8266/2.4.2/cores/esp8266/WString.cpp line 288
0x40212f1e: Syslog::_sendLog(unsigned short, char const*) at /home/jeroen/Arduino/libraries/Syslog/src/Syslog.cpp line 210
0x40212fb4: Syslog::log(unsigned short, char const*) at /home/jeroen/Arduino/libraries/Syslog/src/Syslog.cpp line 84
0x40203c16: mylog(char const*, String, int) at /home/jeroen/Arduino/espMQTT/espMQTT.ino line 522

How can we change const char* arguments during the application running?

I want to change the value of some const char* arguments of syslog() constructor during the application running.

The following is some parts of my code.
Inside loop(), I copied a string derived from the serial input to std::string object. If I create const char* variable "testapp" and put it to syslog.appName() like the following, it works.
However, If I put the copied std::string object with the same string "testapp" replacing with the commented out // line, the library sends other value than "testapp". Even if I put the same string "testapp" multiple times, it changes. It seems to refer the different memory address's value.

This may be c++ programing issue, but could you let me know how to solve this if possible?

//global scope
Syslog syslog(udpClient, server, SYSLOG_PORT, "esp32", LOG_KERN);

void loop() {
...
if (Serial.available() > 0) {
String str = Serial.readStringUntil('\n');
if (str[0] == 'R') {
...
} else if (str[0] == 'A') {
std::string para = myOffset(str, 2);
const char* param = "testapp";
Serial.println(strcmp(para.c_str(), param));
// syslog.appName((const char*)(para.c_str()));
syslog.appName(param);
}
}
...
syslog.logf(LOG_INFO, "%s %d %f %f", d.getAddress().toString().c_str(), id, current, voltage);
}

std::string myOffset (String string, int offset) {
std::string para = "";
for (int i = offset; i < string.length(); i++) {
para += string[i];
}
return para;
}

Is the library still maintained?

There are several issues opened since years...
Is this library maintained?
If not, is a fork maintained?
Or is there any alternative?

Examples fail to deliver first messages

Using the example code (SimpleLoggingESP8266) running on an ESP32 and either Visual Syslog Server and tftpd64 on windows the first message I actually receive is "This is info message no. 1". This skips over the first 2 messages however after the first loop all messages are sent.

Anyone have any idea why this happens, I have tried adding a large delay and several messages in setup yet no change.

192.168.1.22 Jun 02 18:31:33 1 kern info - my-device my-app - - - This is info message no. 1 192.168.1.22 Jun 02 18:31:33 1 daemon info - my-device my-app - - - This is daemon info message no. 1 192.168.1.22 Jun 02 18:31:33 1 kern info - my-device my-app - - - End loop 192.168.1.22 Jun 02 18:31:42 1 kern info - my-device my-app - - - Begin loop 192.168.1.22 Jun 02 18:31:42 1 kern err - my-device my-app - - - This is error message no. 2 192.168.1.22 Jun 02 18:31:42 1 kern info - my-device my-app - - - This is info message no. 2 192.168.1.22 Jun 02 18:31:42 1 daemon info - my-device my-app - - - This is daemon info message no. 2 192.168.1.22 Jun 02 18:31:42 1 kern info - my-device my-app - - - End loop 192.168.1.22 Jun 02 18:31:52 1 kern info - my-device my-app - - - Begin loop 192.168.1.22 Jun 02 18:31:52 1 kern err - my-device my-app - - - This is error message no. 3 192.168.1.22 Jun 02 18:31:52 1 kern info - my-device my-app - - - This is info message no. 3 192.168.1.22 Jun 02 18:31:52 1 daemon info - my-device my-app - - - This is daemon info message no. 3 192.168.1.22 Jun 02 18:31:52 1 kern info - my-device my-app - - - End loop

vsnprintf_P to vsnprintf

This took a long time for me to track down. Using the Arduino IDE for ESP8266.

In a nutshell, including syslog causes vsnprintf_P to be redefined as vsnprintf.

Tested by including a #pragma message("redefined") within the if !defined block.

#if !defined(ARDUINO_ARCH_AVR) || !defined(ARDUINO_ARCH_ESP8266) || !defined(vsnprintf_P) || !defined(ESP8266)
 #pragma message("vsnprintf((buf), (len), (fmt), (args))")
 #define vsnprintf_P(buf, len, fmt, args) vsnprintf((buf), (len), (fmt), (args))
#endif

output from compiler

In file included from /Users/amelvin/Documents/Arduino/libraries/ESPmanager/src/ESPmanager.h:59:0,
                 from /Users/amelvin/Documents/Arduino/libraries/ESPmanager/src/ESPmanager.cpp:2:
/Users/amelvin/Documents/Arduino/libraries/Syslog/src/Syslog.h:19:58: note: #pragma message: vsnprintf((buf), (len), (fmt), (args))
  #pragma message("vsnprintf((buf), (len), (fmt), (args))")

The result of this is that use of it in that lib causes an immediate crash as it using the standard vsnprintf function. Removing the #define vsnprintf_P(buf, len, fmt, args) vsnprintf((buf), (len), (fmt), (args)) causes everything to work fine.

This took a lot of weirdness to figure out, especially as vsnprintf_P functions for serial were still working. The odd thing is that these defines do exist.. ARDUINO_ARCH_ESP8266 and ESP8266, which i added.

any ideas?

why does every function call return *this?

This is great for the setup functions, but I was wondering if a bool for message sent might be more helpful for the sending of messages. That way you know if it was sent, or if it returned because of an error.

There is no way of checking that everything has been configured correctly at the moment ?

Good lib BTW.

Example that receive serial stream data to SysLog server with integrated Telnet client


/*
  WiFiTelnetToSerial - Example Transparent UART to Telnet Server for ESP32

  Copyright (c) 2017 Hristo Gochkov. All rights reserved.
  This file is part of the ESP32 WiFi library for the Arduino environment.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/*
 * This program act as a Telnet server and will allow monitoring of a serial stream on
 * Serial2. It gathers all char into a buffer until it receives a Line-Feed 0X0A, 
 * add a carriage return, 0X0D, and a string terminator, 0X00. then send 
 * data out to Telnet client. 
 * 
 * This will also send the data out to a SYSLOG server.
 * 
CHANGE LOG:
 *
 *  DATE         REV  DESCRIPTION
 *  -----------  ---  ----------------------------------------------------------
 *  20-Feb-2021 1.0   TRL - First test 
 *  21-Feb-2021 1.0a  TRL - Added Syslog and serial buffering
 *
 *
 *  Notes:  1)  Tested with Arduino 1.8.13
 *          2)  ESP32 Feather
 *          3)  If RX line is open, it will cause chatter and overflow buffer
 *          4)  Will not send buffer to syslog if less that 3 char, ie: an empty line|
 *          5)  
 *
 *          
 *  Todo:   1) 
 * 
 * TRL --> Tom Lafleur --> [email protected]
 */


#include <WiFi.h>
#include <Syslog.h>       // https://github.com/arcao/Syslog
#include <WiFiUdp.h>


//how many clients should be able to telnet to this ESP32
#define MAX_SRV_CLIENTS 4
const char* ssid      = "MySSID";
const char* password  = "MyPassword";

// Syslog server connection info
#define SYSLOG_SERVER "192.168.1.32"  // or FQDN
#define SYSLOG_PORT 514

// This device info
#define DEVICE_HOSTNAME "WS4a"
#define APP_NAME "WS4b"
#define ANOTHER_APP_NAME "my-another-app1"

WiFiServer server(23);
WiFiClient serverClients[MAX_SRV_CLIENTS];

// A UDP instance to let us send and receive packets over UDP
WiFiUDP udpClient;

// Create a new empty syslog instance using IETF format
Syslog syslog(udpClient, SYSLOG_PROTO_IETF);


#define   bufferSize 1024
char      buffer[bufferSize];
byte      c;
uint32_t  bufferIndex = 0;
bool      bufferFull  = false;



/* ************************************************************* */
/* ************************************************************* */
/* ************************************************************* */
void setup() 
{
  Serial.begin(115200);
  //while (!Serial)
  
  Serial.print("\nSerial to Telnet and SYSLOG\n");

  WiFi.begin(ssid, password);

  Serial.print("** Connecting Wifi\n");
  for (int loops = 10; loops > 0; loops--) 
  {
    if (WiFi.status() == WL_CONNECTED) 
    {        
      Serial.println  ("");
      Serial.print    ("WiFi connected ");
      Serial.print    ("IP address: ");
      Serial.println  (WiFi.localIP());
      break;
    }
    else 
    {
      Serial.printf("WiFi Connect attemps: %u\n", loops);
      delay(1000);
    }
  }
  if (WiFi.status() != WL_CONNECTED) 
  {
    Serial.printf ("WiFi connect failed\n");
    delay(1000);
    ESP.restart();
  }

  // start UART and the server
  Serial2.begin(115200);
 
  server.begin();
  server.setNoDelay(true);

  Serial.print    ("Use --> 'telnet ");
  Serial.print    (WiFi.localIP());
  Serial.println  (" 23' to connect");

  memset(buffer, 0, bufferSize);            // clear buffer...

// prepare syslog configuration here (can be anywhere before first call of 
//   log/logf method)

  syslog.server(SYSLOG_SERVER, SYSLOG_PORT);
  syslog.deviceHostname(DEVICE_HOSTNAME);
  syslog.appName(APP_NAME);
  syslog.defaultPriority(LOG_KERN);

  syslog.logMask(LOG_MASK (LOG_INFO) );
  
  syslog.log(LOG_INFO, "Done with setup");
  
  Serial.print ("Done with setup\n");
}


/* ************************************************************* */
/* ************************************************************* */
/* ************************************************************* */
void loop() 
{
  uint8_t i;

   if (Serial2.available())
   {
      if ( bufferIndex > bufferSize-3) 
      { 
        bufferIndex = 0;   // this will fix crash if RX line is open
        Serial.print("Buffer Overflow!, reseting buffer..\n");
      }
      
      c = Serial2.read();
      buffer[bufferIndex] = c;
      bufferIndex++;
      if ( c == 0x0a)                   // check for a lf 0x0a
      {
        buffer[bufferIndex] = 0x0d;     // add a CR 0x0d
        bufferIndex++;
        buffer[bufferIndex] = 0x00;     // add a end of string 

        bufferFull = true;

        // check for an empty message, don't send it to syslog
        if (bufferIndex >= 3) syslog.logf(LOG_INFO, "%s", buffer); 
      }
      
      if ( c == 0x0d)       //  flush any extra CR
      {
        bufferIndex--;      
        buffer[bufferIndex] = 0x00;
      }
   }

// check if we have a telnet connection
  if (WiFi.status() == WL_CONNECTED) 
  {
    //check if there are any new clients
    if (server.hasClient())
    {
      for(i = 0; i < MAX_SRV_CLIENTS; i++)
      {
        // find free/disconnected spot
        if (!serverClients[i] || !serverClients[i].connected())
        {
          if(serverClients[i]) serverClients[i].stop();
          serverClients[i] = server.available();
          if (!serverClients[i]) Serial.println("available broken");
          Serial.print  ("New client: ");
          Serial.print  (i); Serial.print(' ');
          Serial.println(serverClients[i].remoteIP());
          break;
        }
      }
      if (i >= MAX_SRV_CLIENTS) 
      {
        // no free slot, so disconnected stop, to reject connection
        server.available().stop();
      }
    }
    
// check clients for RX data to us
    for(i = 0; i < MAX_SRV_CLIENTS; i++)
    { 
      if (serverClients[i] && serverClients[i].connected())
      {
        if(serverClients[i].available())
        {
          // get data from the telnet client and push it to the UART
          while(serverClients[i].available()) Serial2.write(serverClients[i].read());
        }
      }
      else 
      {
        if (serverClients[i]) 
        {
          serverClients[i].stop();
        }
      }
      
    }   // end of for...
    
// check serial UART for data to send to client
    if (bufferFull)
    {
      // push UART data to all connected telnet clients
      for(i = 0; i < MAX_SRV_CLIENTS; i++)
      {
        if (serverClients[i] && serverClients[i].connected())
        {
          serverClients[i].write(buffer, strlen(buffer));
          delay(1);
        }
      }
    }   // end of if (serial2 avilable...)
    
  }   // end of if wifi status is connected
  
  else 
  {
    Serial.println  ("WiFi not connected!");
    for(i = 0; i < MAX_SRV_CLIENTS; i++) 
    {
      if (serverClients[i]) serverClients[i].stop();
    }
    delay(1000);
  }

    if (bufferFull)           // if bufferFull flag is true, we are now done with buffer
    {
      bufferIndex = 0;
      bufferFull = false; 
    }
}   // end of loop

/* ****************** End of Program *************** */

Allow multiple outputs

@arcao

I would like to suggest a feature for this project.

Given that it might be interesting to be able retrieve logs that might have been created while a device didn't have access to the network or while the syslog server was down, it would be nice to offer an option to have a buffer page of a predetermined size and periodically rotate it. In order to minimize the impact to the memory, the logs could be written to a SPIFFS file. Maybe this is an overkill for the flash memory, I don't know what sort of abuse it can sustain in terms of write/erase cycles.

Please let me know your thoughts.

logf_P fails

Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
0x4021ec20: vsnprintf at /Users/igrokhotkov/e/newlib-xtensa/xtensa-lx106-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vsnprintf.c line 42
0x401004e4: malloc at C:\Users\daud\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc/umm_malloc.c line 1672
0x4021abc4: operator new[](unsigned int) at C:\Users\daud\Documents\Arduino\hardware\esp8266com\esp8266\cores\esp8266/abi.cpp line 71
0x4021751a: Syslog::vlogf(unsigned short, char const*, __va_list_tag) at C:\Users\daud\Documents\Arduino\libraries\Syslog\src/Syslog.cpp line 38
0x40217568: Syslog::logf(char const*, ...) at C:\Users\daud\Documents\Arduino\libraries\Syslog\src/Syslog.cpp line 38
0x4020d6e3: setup at C:\Users\daud\Documents\Arduino\myClock/myClock.ino line 116

This works as expected:
Serial.printf_P(PSTR("setup: %s, %s, %s, %d, %d \r\n"), location.c_str(), timezone.c_str(), milTime ? "true" : "false", brightness, light);

This does not:
syslog.logf_P(PSTR("setup: %s|%s|%s|%d|%d"), location.c_str(), timezone.c_str(), milTime ? "true" : "false", brightness, light);

My full code is available at https://github.com/dragondaud/myClock

Documentation or warning that Syslog constructor doesn't make deep copies

I just spent 1 or 2 hours trying to debug why this simple usage case does not work at all


Syslog *mySyslog;
WiFiUDP myUdp;
void start_syslog(void){
char hostname[64];
read_hostname_from_config(&hostname); // read NULL terminated string from EEPROM, SD-card, etc.
mySyslog = new Syslog(
        myUdp
        hostname,
        2222, 
        "myhostname",
        "appName"
        LOG_LOCAL3, 
        SYSLOG_PROTO_IETF);
}

Basically this code would run but when I try and use mySyslog->log I get false as a return value. I spent a while troubleshooting my code before I looked at your implementation of Syslog.cpp. It was pretty obvious that my problem was the constructor just stores the pointer, not copies it. If you read the configuration from some dynamic source it means you can't pass in a stack variable.

I switched to using a global array for my hostname and it worked fine.

I think this implementation is fine, but it might save others some headache if you added notes warning them the constructor does not make deep copies and the caller must keep the memory segment around and unaltered.

Just a question about strange characters ( ) in syslog file

Hi, and thanks for at great library.

I use it with rsyslog server on debian and wonder why i get strange characters ( ) in syslog file.

Aug 11 18:00:47 esp32-1 RC-Switch Temperature Sensor 1 25.937500
Aug 11 18:00:57 esp32-1 RC-Switch Temperature Sensor 1 26.000000

It is OK if i change this in syslog.cpp
if (this->_protocol == SYSLOG_PROTO_IETF) {
//this->_client->print(F(" - - - \xEF\xBB\xBF"));
this->_client->print(F(" - - - "));
} else {
this->_client->print(F("[0]: "));
}

I know this is not OK, but could you explain ?

thanks,
[email protected]

Disconnected operations

Hi Arcao,
I have a project that needs to run also when disconnected from Wifi.
I integrated your lib and have a number of syslog statements in my code. What happens when syslog is called and connection is not there? is it handled gracefully or is it an error condition? Does it lock until a timeout? please let me know.
thanks!

Pass IP address instead of server name

Hi,

I run a home lab and want to specify the IP address of the SYSLOG_SERVER, but seems like it only is looking for a string. (Since I'm tcpdumping the destination and nothing is coming to 514).

Tnx, Tuc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.