[riot-notifications] [RIOT-OS/RIOT] syslog: add a simple syslog module (#15739)

Vincent Dupont notifications at github.com
Tue Jan 12 14:08:39 CET 2021


@vincent-d commented on this pull request.



> +
+#include "thread.h"
+#include "time.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef CONFIG_SYSLOG_MAX_STRING_LEN
+#define CONFIG_SYSLOG_MAX_STRING_LEN    256
+#endif
+
+struct syslog_msg {
+    /* metadata */
+    uint8_t pri;
+    struct tm time;

Unfortunately, there is no high-level API that takes advantage of RTC. The 'real' date is printed in the logs, so RTC is handy.
Though I agree, the full `struct tm` is a bit overkill and it may be too limiting to force the dependency to `periph_rtc`.
We could imagine having different implementations depending on if RTC is available I guess.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15739#discussion_r555756848
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210112/0e27d430/attachment.htm>


More information about the notifications mailing list