Skip to content

remove superfluous whitespace#366

Merged
FranzBusch merged 1 commit intoapple:mainfrom
weissi:jw-no-extra-ws
Jul 18, 2025
Merged

remove superfluous whitespace#366
FranzBusch merged 1 commit intoapple:mainfrom
weissi:jw-no-extra-ws

Conversation

@weissi
Copy link
Copy Markdown
Member

@weissi weissi commented Jul 18, 2025

Motivation:

StreamLogHandler has at some point in time acquired an extra whitespace:

2025-07-18T10:09:12+0100 notice label : hello
                                     ^
                                     |
                                     this one is superfluous

but we don't typically put spaces in front of :s. This PR changes it to

2025-07-18T10:09:12+0100 notice label: hello
                                     ^
                                     |
                                     no extra space

Additionally, if the label is empty (""), then we shouldn't print any spaces there. So with an empty label, we go from

2025-07-18T10:09:12+0100 notice  : hello
                               ^^
                                |
                                two superfluous spaces

to

2025-07-18T10:09:12+0100 notice: hello
                               ^
                               |
                               no extra spaces

Modifications:

  • Remove superfluous space if label is not empty
  • Remove two superfluous spaces if label is empty

Result:

  • Somewhat more compact output
  • Nicer output

@weissi weissi added the 🔨 semver/patch No public API change. label Jul 18, 2025
@weissi weissi requested a review from FranzBusch July 18, 2025 09:17
@FranzBusch FranzBusch enabled auto-merge (squash) July 18, 2025 09:25
@FranzBusch FranzBusch merged commit ce592ae into apple:main Jul 18, 2025
31 checks passed
@weissi weissi deleted the jw-no-extra-ws branch July 18, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants