[riot-devel] Lightweight Syslog Implementation

Juan Ignacio Carrano j.carrano at fu-berlin.de
Mon May 27 14:44:02 CEST 2019


On 24/5/19 11:40, Kaspar Schleiser wrote:

 > IMO the syslog API itself should not be used for new or RIOT-targeting
> applications...

Except it already is:

> #define log_write(level, ...) printf(__VA_ARGS__)

and

> static inline void log_write(unsigned level, const char *format, ...) {

While syslog has

> void syslog(int priority, const char *format, ...);

So the existing log framework is almost the same as syslog, but with 
different names (it makes sense, there are not that many ways of doing 
logging.)

BTW, this thing can be quite useful when logging to serial: by having a 
backend that sends logs as messages in a queue one can prevent messages 
sent simultaneously from stepping over each other.

Regards,

Juan.


More information about the devel mailing list