a month ago I wrote a small lightweight syslog/syslogd implementation for RIOT and added a pull request. This mainly is for a private/university project and since I may got some spare time in the next weeks to continue working on this, I thought about getting some feedback from this list beforehand. First and most important is the question if this feature is still of interest for the RIOT community? It was originally mentioned in a feature request back in 2015 and may be obsolete by this time. Anyway, I think RIOT could benefit from a syslog implementation with udp remote logging feature and hope I can continue working on this.
A few more details about the implementation:
- I separated the syslog implementation and the syslogd implementation used for log shipping.
- I implemented the syslog implementation as described in the glibc documentation for compatibility reasons.
- The implementation should be rfc5424 compatible.
- The syslog implementation itself is able to log to console.
- The syslogd implementation adds support for log shipping to file and via udp.
If this is still of interest i have some question about the general design and would be happy if someone could give me feedback about the following topics/design decisions
- I implemented the syslogd implementation as a RIOT pkg. The reasons are that the syslogd implementation should be easily exchangeable and is not needed for basic functionality such as logging to console. I more or less see the syslogd implementation as a proof of concept and it may need a lot more work (especially compile time configurable outputs would be cool to minimize the binary size).
- The syslogd implementation gets its input via RIOT IPC. Which is not the most generic way but way better than writing an abstraction for /dev/log which needs FS support and stuff. On the downside, any syslogd needs an implementation for RIOT IPC inputs.
- Should the syslog implementation be included into an existing logging API?
I appreciated any feedback you may have.