Skip to content
Snippets Groups Projects
  • Simon Glass's avatar
    9ad7a6c2
    log: Handle line continuation · 9ad7a6c2
    Simon Glass authored and Tom Rini's avatar Tom Rini committed
    
    When multiple log() calls are used which don't end in newline, the
    log prefix is prepended multiple times in the same line. This makes the
    output look strange.
    
    Fix this by detecting when the previous log record did not end in newline.
    In that case, setting a flag.
    
    Drop the unused BUFFSIZE in the test while we are here.
    
    As an example implementation, update log_console to check the flag and
    produce the expected output.
    
    Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    9ad7a6c2
    History
    log: Handle line continuation
    Simon Glass authored and Tom Rini's avatar Tom Rini committed
    
    When multiple log() calls are used which don't end in newline, the
    log prefix is prepended multiple times in the same line. This makes the
    output look strange.
    
    Fix this by detecting when the previous log record did not end in newline.
    In that case, setting a flag.
    
    Drop the unused BUFFSIZE in the test while we are here.
    
    As an example implementation, update log_console to check the flag and
    produce the expected output.
    
    Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>