[riot-notifications] [RIOT-OS/RIOT] Add basic syslog implementation (#11362)

Matthias Miehl notifications at github.com
Fri May 24 09:34:31 CEST 2019


makomi commented on this pull request.



> +#include <unistd.h>
+#include <time.h>
+#include <netdb.h>
+
+#define ENABLE_DEBUG (0)
+#include "debug.h"
+
+#include "syslog/syslog.h"
+#include "xtimer.h"
+
+static char buf[SYSLOG_BUF_NUMOF][SYSLOG_MAX_LEN];
+static syslog_msg_t _msg[SYSLOG_BUF_NUMOF];
+static char _ident[IDENT_MAX_LEN];
+static char hostname[HOST_NAME_MAX];
+static mutex_t syslog_mutex = MUTEX_INIT;
+static int _facility = 0;

If you like, you can drop the explicit initialization of  `_facility`, since it will be initialized to `0` anyway. See sections 6.2.4 (3) and 6.7.8 (10) of a [draft of the ISO C (ANSI C) standard](http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf).

-- 
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/11362#pullrequestreview-241590914
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190524/156b2f7a/attachment-0001.html>


More information about the notifications mailing list