# Choose a more unique log-group pattern

**URL:** <https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152>\
**Category:** Features Requests\
**Created:** [July 10, 2020, 5:09pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152 "2020-07-10T17:09:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![petemounce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/petemounce/32/339_2.png) [@petemounce](https://forum.buildkite.community/u/petemounce)\
**Post date:** [July 10, 2020, 5:09pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/1 "2020-07-10T17:09:59Z")

</div>

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

- FastBuild emits `----------------------------------------------------` before/after stages ([fastbuild.org](http://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](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.

---

<div class="post-metadata">

**Author:** ![Rose](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/rose/32/834_2.png) [@Rose](https://forum.buildkite.community/u/Rose)\
**Post date:** [July 14, 2020, 1:06am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/2 "2020-07-14T01:06:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/simonbyrne/32/847_2.png) [@simonbyrne](https://forum.buildkite.community/u/simonbyrne)\
**Post date:** [August 3, 2020, 3:47am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/3 "2020-08-03T03:47:13Z")

</div>

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

> <https://github.com/travis-ci/travis-rubies/blob/918fdab9719cbfa8b3cdc65234080e7608722d63/build.sh#L41-L47>

---

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [August 11, 2020, 4:15am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/4 "2020-08-11T04:15:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![petemounce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/petemounce/32/339_2.png) [@petemounce](https://forum.buildkite.community/u/petemounce)\
**Post date:** [August 11, 2020, 3:51pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/5 "2020-08-11T15:51:15Z")

</div>

Would you mind sharing how?

---

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [August 25, 2020, 10:43pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/6 "2020-08-25T22:43:48Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![emphapathy](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@emphapathy](https://forum.buildkite.community/u/emphapathy)\
**Post date:** [April 16, 2021, 1:54am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/7 "2021-04-16T01:54:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon57234190](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@anon57234190](https://forum.buildkite.community/u/anon57234190)\
**Post date:** [April 16, 2021, 3:54am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/8 "2021-04-16T03:54:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![emphapathy](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@emphapathy](https://forum.buildkite.community/u/emphapathy)\
**Post date:** [May 4, 2021, 8:11am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/9 "2021-05-04T08:11:46Z")

</div>

What did the rest of the team say @anon57234190 ?

---

<div class="post-metadata">

**Author:** ![Jason](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/jason/32/742_2.png) [@Jason](https://forum.buildkite.community/u/Jason)\
**Post date:** [May 7, 2021, 3:38am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/10 "2021-05-07T03:38:04Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Kache](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@Kache](https://forum.buildkite.community/u/Kache)\
**Post date:** [December 23, 2023, 11:27pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/11 "2023-12-23T23:27:39Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![james.s](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/james.s/32/1305_2.png) [@james.s](https://forum.buildkite.community/u/james.s)\
**Post date:** [December 26, 2023, 9:51pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/12 "2023-12-26T21:51:18Z")

</div>

Hey @Kache!

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

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?

---

<div class="post-metadata">

**Author:** ![Kache](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@Kache](https://forum.buildkite.community/u/Kache)\
**Post date:** [December 27, 2023, 4:46pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/13 "2023-12-27T16:46:32Z")

</div>

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](https://www.thegeekstuff.com/2008/09/bash-shell-take-control-of-ps1-ps2-ps3-ps4-and-prompt_command/)

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

```

---

<div class="post-metadata">

**Author:** ![karen.sawrey](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/karen.sawrey/32/1188_2.png) [@karen.sawrey](https://forum.buildkite.community/u/karen.sawrey)\
**Post date:** [December 27, 2023, 6:23pm UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/14 "2023-12-27T18:23:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ozdenyilmaz](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ozdenyilmaz](https://forum.buildkite.community/u/Ozdenyilmaz)\
**Post date:** [January 8, 2024, 5:26am UTC](https://forum.buildkite.community/t/choose-a-more-unique-log-group-pattern/1152/15 "2024-01-08T05:26:38Z")

</div>

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!
