System logger
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
maze 780e7e544d Time support 1 year ago
.gitignore Initial commit 1 year ago
LICENSE Initial commit 1 year ago
README.md Updated README 1 year ago
Syslog.cpp Time support 1 year ago
Syslog.h Time support 1 year ago
Syslog.hpp Use .h for headers 1 year ago
library.json Added platformio metadata 1 year ago
library.properties Added platformio metadata 1 year ago

README.md

Syslog

System logger that by default logs to serial port.

This package was written for ESP8266, but is probably easy to port to other platforms such as ESP32, Arduino Ethernet shield, etc. Pull requests are welcome.

Example

#include <Syslog.h>

void setup() {
    Serial.begin(115200);
    syslog(INFO, "setup starts");

    /* ... connect to wifi, etc. */

    WifiUDP udp;
    syslog.setHostname(String("esp-") + ESP.getChipId());
    syslog.setRemote(udp, "172.23.42.3");

    syslog(INFO, "look, I'm now logging remotely");
}

void loop() {
    /* ... */
}