[go: up one dir, main page]

Skip to content

Use more modest colorization of prettified log message

If the log message spans multiple lines, the entire log message is colorized (in a blue that matches the terminal's theme). This heavy colorization can make the message difficult to read. Furthermore, the hint that instructs the user to add the --stacktrace option to see the cause of the error is also shown in the same color. As a result, it gets lost in the message.

Here's an example of a message (though not shown here in color for obvious reasons):

[16:01:30.268] FATAL (antora): antora.yml has invalid syntax; end of the stream or a document separator is expected (2:5) 

 1 | --
 2 | name: component-name
---------^
 3 | version: '1.0'
 4 | prerelease: ' Beta' in /path/to/project (ref: main <worktree> | path: docs)
Add the --stacktrace option to see the cause of the error.

What I propose is to stop colorizing after the first line of the message (if the message spans multiple lines) and to colorize the hint in a dim neutral color.

Edited by Dan Allen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information