fjpanag opened a new pull request, #6363:
URL: https://github.com/apache/incubator-nuttx/pull/6363

   ## Summary
   
   When `CONFIG_SYSLOG_COLOR_OUTPUT` is enabled, the terminal color is set 
before the message is printed, and it is reset at the end of the print.
   
   It can happen that the log output may be interrupted (e.g. system crash, 
external reset etc). In this case, the color reset escape sequence will not be 
sent. On the next boot, all output on the terminal is presented on the wrong 
color (the terminal remembers the last setting, while the firmware assumes that 
everything is in a clean state).
   
   This fix resets the terminal color every time a syslog channel is added, so 
even the very first print will be correct.
   
   ## Impact
   
   Handles the case where a syslog message is printed with an incorrect color.
   
   ## Testing
   
   I logged the bytes sent from the logger, and indeed the escape sequence is 
sent the moment the channel is added.
   
   


-- 
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

Reply via email to