# How to disable colors in circleci runner's logs

**URL:** <https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649>\
**Category:** Running Tests\
**Tags:** docker\
**Created:** [August 8, 2024, 11:00am UTC](https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649 "2024-08-08T11:00:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![doctornkz-intelas](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/doctornkz-intelas/32/35484_2.png) [@doctornkz-intelas](https://discuss.circleci.com/u/doctornkz-intelas)\
**Post date:** [August 8, 2024, 11:00am UTC](https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649/1 "2024-08-08T11:00:34Z")

</div>

Hello, folks.  
I am using CircleCi self-hosted runners in K8S. There is a Datadog agent that scrapes all logs from all pods and streams them into the DataDog Logs system. The problem is in shell coloring, it breaks heuristic in log processing, look:

`10:15:03 e[1;38;5;92m181b4e[0m 15.025ms e[1;38;5;203mworker loop: claim: e[0m app.backoff_ms=5000 app.loop_name=claim: mode=agent result=success service.name=circleci-runner service_name=circleci-runner`

DataDog can’t parse them automatically and show them as errors by default.  
I can go way around with Grok and reprocess them, but what is better and more consistent - to disable coloring with some environment variable, like:  
`CIRCLECI_RUNNER_DISABLE_COLORS=True`

What did I miss there and what do you think?

---

<div class="post-metadata">

**Author:** ![doctornkz-intelas](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/doctornkz-intelas/32/35484_2.png) [@doctornkz-intelas](https://discuss.circleci.com/u/doctornkz-intelas)\
**Post date:** [August 16, 2024, 11:58am UTC](https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649/3 "2024-08-16T11:58:51Z")

</div>

Excuse me, but can we avoid AI members in this thread? It makes no sense.

---

<div class="post-metadata">

**Author:** ![doctornkz-intelas](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/doctornkz-intelas/32/35484_2.png) [@doctornkz-intelas](https://discuss.circleci.com/u/doctornkz-intelas)\
**Post date:** [September 2, 2024, 9:47pm UTC](https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649/4 "2024-09-02T21:47:02Z")

</div>

After `grep -a "color" circleci-runner` I found this section in binary:

```auto
yaml:"format" env:"FORMAT" 
enum:"text,color,json,none" default:"color"

```

So I will use something like that:  
`CIRCLECI_RUNNER_LOGGING_FORMAT=json`

Closing ticket.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [September 9, 2024, 9:47pm UTC](https://discuss.circleci.com/t/how-to-disable-colors-in-circleci-runners-logs/51649/5 "2024-09-09T21:47:41Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
