Choose a more unique log-group pattern

The --- and +++ patterns to manage log groups are quite common prefixes for build output

  • FastBuild emits ---------------------------------------------------- before/after stages (fastbuild.org)
  • diff emits --- and +++ - we use this to prove that generated code that we need to nonetheless source control is up to date

It’s not rare.

Would it be possible to get these patterns (https://buildkite.com/docs/pipelines/managing-log-output#main) changed so that something more unique and uncolliding is the One True Way to divide up logs?

e.g. bk--- etc would do it just fine, I think.

Thanks @petemounce! Yeah, there’s a number of tools (you can add Golang to the list) where the output collides with what we’ve chosen as the Buildkite grouping output. We’ll continue to look at some alternative ideas there… your bk--- suggestion is good!

1 Like

FYI Travis CI uses a longer string with ANSI escape codes, and lets you mark the begin and end (which allows for nested groups):

We got around this by putting a zero-space character in front of +++ and ---.

Would you mind sharing how?

Sure thing. Just google for “zero width space” and you’ll get: https://www.fileformat.info/info/unicode/char/200b/index.htm

When you make your string, instead of "+++", do "\u200B+++".

Any progress on this feature request?

.Net stack traces also contain — which is currently annoying me

You could possibly make this a pipeline level option which would be non-breaking

Hi @emphapathy thanks for the bump, I’ll raise it with the rest of the team!

What did the rest of the team say @eleanor ?

Hey @emphapathy, the product team is currently figuring out where it sits in priority; nothing to report as yet in terms of a timeline, but keep watching this space as we will update any news on this feature here :slight_smile:

Also collides with bash xtrace (set -x) over 2 levels deep, which can happen easily in a script, e.g.

$ bash -xc 'foo=$(cat <(echo "hey"))'
++ cat /dev/fd/63
+++ echo hey
+ foo=hey

Hey @Kache!

Thanks for bringing this up again - welcome to the forum too! :wave:

Can see where the interruption/collision would come with xtrace: and with the example too. Moreso with the original ask: would you only expect that (or equivalent line with xtrace on) to be run in certain parts of the pipeline that might generate the log group delimiter?

Yes, (I think)?

Isn’t the point to add custom annotation to any part of the pipeline? Not sure what you’re asking about.

I have found a good workaround for xtrace collision though, via PS4 to change the prefix character: Bash Shell: Take Control of PS1, PS2, PS3, PS4 and PROMPT_COMMAND

export PS4="÷"  # Avoid bash xtrace and buildkite log grouping '+' collision: https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/11

Hello, @Kache!
Thank you for the feedback. We’re bumping this up to the attention of our product team now.

Hi @Kache I am from the product team. Unfortunately this is still in our backlog to get to, thanks a lot for sharing extra information. Have a great day!