Skip to content

Prefix padding - #495

Merged
gustavohenke merged 6 commits into
mainfrom
prefix-padding
Aug 16, 2024
Merged

gustavohenke merged 6 commits into
mainfrom
prefix-padding

Conversation

@gustavohenke

@gustavohenke gustavohenke commented Aug 4, 2024 •

Copy link
Copy Markdown
Member

Added a --pad-prefix flag which makes all prefixes the same length, padding shorter ones with spaces.

Example:

$ concurrently -n foo,barbaz --pad-prefix "echo foo" "echo bar"
[foo   ] foo
[foo   ] echo foo exited with code 0
[barbaz] bar
[barbaz] echo bar exited with code 0

Noteworthy:
Although most prefixes have a stable length, PIDs can become longer if the command restarts, e.g. it was originally 9 but after a restart it's 10.
Obviously we can't rewrite the past, so new log entries from that respawn onwards will be padded appropriately.

Closes #166
Closes #417

@gustavohenke gustavohenke added this to the v9 milestone Aug 4, 2024
@coveralls

coveralls commented Aug 4, 2024 •

Copy link
Copy Markdown

Coverage Status

coverage: 99.177% (+0.03%) from 99.144%
when pulling 126b571 on prefix-padding
into 23f97ac on main.

Comment thread src/logger.ts Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a --fix-name-length option to align command output Options to make sure names are the same length

2 participants