You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two minor issues with log spacing, depending on the format and colors options chosen.
There's an extra single space character preceding the first ANSI color sequence at the beginning of the string (before "info" or "warn" in the following examples). This is most obvious with format: pretty, colors: true. There's also an extra space character at the end of each line when colors: false. I didn't notice this until I examined the code.
There's a missing space character after the timestamp and before the actual log message. This is obvious with format: pretty-timestamped, colors: false.
As a result of these two issues, the above two option combinations produce logs with either extra unnecessary characters or characters that are mashed together making the log more difficult to read. However, if you were to only look at the format: pretty-timestamped, colors: true combination, things would appear to be correct, but that hides the underlying issues.
Here are the four relevant combinations for comparison:
format: pretty, colors: false:
Note the extra space at the end of each line.
info --- config file - /home/greybornadmin/.config/verdaccio/config.yaml
info --- using htpasswd file: /home/greybornadmin/.config/verdaccio/htpasswd
info --- plugin successfully loaded: verdaccio-htpasswd
info --- plugin successfully loaded: verdaccio-audit
warn --- http address - http://0.0.0.0:4873/ - verdaccio/5.29.2
Configure Verdaccio logging with (format: pretty, colors: true) or (format: pretty-timestamped, colors: false) to see the issues.
Expected behavior
If (1) the space was removed from the beginning of the first ANSI sequence when colors: true is enabled, and (2) an extra space was added to the end of the timestamp when format: pretty-timestamped is enabled, both issues would be fixed, and you'd still have the same formatting you currently have with format: pretty-timestamped, colors: true.
format: pretty, colors: true should have no space at the start of each line:
The text was updated successfully, but these errors were encountered:
somethingSTRANGE
changed the title
Bad log spacing depending on the FORMAT and COLOR options used
Bad log spacing depending on the FORMAT and COLORS options used
May 6, 2024
Your Environment
Describe the bug
There are two minor issues with log spacing, depending on the
format
andcolors
options chosen.There's an extra single space character preceding the first ANSI color sequence at the beginning of the string (before "info" or "warn" in the following examples). This is most obvious with
format: pretty
,colors: true
. There's also an extra space character at the end of each line whencolors: false
. I didn't notice this until I examined the code.There's a missing space character after the timestamp and before the actual log message. This is obvious with
format: pretty-timestamped
,colors: false
.As a result of these two issues, the above two option combinations produce logs with either extra unnecessary characters or characters that are mashed together making the log more difficult to read. However, if you were to only look at the
format: pretty-timestamped
,colors: true
combination, things would appear to be correct, but that hides the underlying issues.Here are the four relevant combinations for comparison:
format: pretty
,colors: false
:Note the extra space at the end of each line.
format: pretty
,colors: true
:Note the space at the start of each line.
format: pretty-timestamped
,colors: false
:Note the missing space before "info" and "warn", but there is an extra space at the end of each line.
format: pretty-timestamped
,colors: true
:To Reproduce
Configure Verdaccio logging with (
format: pretty
,colors: true
) or (format: pretty-timestamped
,colors: false
) to see the issues.Expected behavior
If (1) the space was removed from the beginning of the first ANSI sequence when
colors: true
is enabled, and (2) an extra space was added to the end of the timestamp whenformat: pretty-timestamped
is enabled, both issues would be fixed, and you'd still have the same formatting you currently have withformat: pretty-timestamped
,colors: true
.format: pretty
,colors: true
should have no space at the start of each line:format: pretty-timestamped
,colors: false
should have a space after the timestamp, but not at the end of the line:Environment information
Contribute to Verdaccio
The text was updated successfully, but these errors were encountered: