Coder Social home page Coder Social logo

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 sysoleg avatar jeremy-gill avatar gitter-badger avatar per1234 avatar

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.