fjpanag commented on code in PR #6363: URL: https://github.com/apache/incubator-nuttx/pull/6363#discussion_r889684150
########## drivers/syslog/syslog_channel.c: ########## @@ -259,13 +259,26 @@ int syslog_channel(FAR struct syslog_channel_s *channel) int i; #endif +#if defined(CONFIG_SYSLOG_COLOR_OUTPUT) + char * col_rst = "\e[0m"; +#endif + DEBUGASSERT(channel != NULL); if (channel != NULL) { DEBUGASSERT(channel->sc_ops->sc_putc != NULL && channel->sc_ops->sc_force != NULL); +#if defined(CONFIG_SYSLOG_COLOR_OUTPUT) + /* Reset the terminal style before using it. */ Review Comment: This is one possible solution, but it will always leave the terminal configured on the last used color, instead of returning it to normal like it does now. Is this desirable? I think this will cause unwanted side-effects. Examples: * Using the same serial port both for the logger and for NSH. * When restarting the system, a bootloader may need to use the serial output before NuttX starts (and resets the terminal). Another solution is to add the color sequence both at the start and the end of the print, but it seems a bit excessive. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org