[riot-notifications] [RIOT-OS/RIOT] sys/log: add module for colorized logging (#11573)

Alexandre Abadie notifications at github.com
Mon May 27 15:55:32 CEST 2019


aabadie commented on this pull request.



> +    va_start(args, format);
+    /* Temporarily disable clang format-nonliteral warning */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif /* clang */
+    vprintf(format, args);
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif /* clang */
+    va_end(args);
+    printf(LOG_RESET_ANSI_COLOR_CODE);
+
+#ifdef MODULE_NEWLIB
+    /* no fflush on msp430 */
+    fflush(stdout);

Except that make term or pyterm are not the only wait to connect to the stdout of a board. If I use `miniterm.py /dev/ttyACM0 115200` or minicom or whatever, the terminal is not reset when exiting the tool. I think it's safer to let the call to `LOG_XX` do this.

-- 
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/11573#discussion_r287800055
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190527/fc8b3bef/attachment.html>


More information about the notifications mailing list