Browse Source

Updated README

master
maze 4 years ago
parent
commit
7932834795
1 changed files with 28 additions and 1 deletions
  1. +28
    -1
      README.md

+ 28
- 1
README.md View File

@ -1,3 +1,30 @@
# Syslog
System logger
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
```c++
#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() {
/* ... */
}
```

Loading…
Cancel
Save