# How do I "echo" a log message with a color?

**URL:** <https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437>\
**Category:** Build Environment\
**Created:** [February 17, 2017, 7:53pm UTC](https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437 "2017-02-17T19:53:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![qthenu](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/qthenu/32/1075_2.png) [@qthenu](https://discuss.circleci.com/u/qthenu)\
**Post date:** [February 17, 2017, 7:53pm UTC](https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437/1 "2017-02-17T19:53:37Z")

</div>

My circle.yml file is quite lean and just passes control on to a shell script that does most of the heavy lifting. Throughout the build/test/deploy/release processes I have a few log messages sprinkled throughout my shell script so that I can quickly scan through the CircleCI Build Summary to see what’s going on.

I would like these log messages to an easy to spot color, so they stand out. How do I do this?

I have tried (nearly?) all options listed here: [http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux](http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux) but they don’t seem to work

---

<div class="post-metadata">

**Author:** ![zzak](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/zzak/32/4233_2.png) [@zzak](https://discuss.circleci.com/u/zzak)\
**Post date:** [February 20, 2017, 2:11pm UTC](https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437/2 "2017-02-20T14:11:54Z")

</div>

Hello @qthenu,

ANSI encoded color output should Just Work ™, as I’ve seen it work with `rspec` and `cucumber`.

Could you provide an example script you tried?

---

<div class="post-metadata">

**Author:** ![rtm](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/rtm/32/17055_2.png) [@rtm](https://discuss.circleci.com/u/rtm)\
**Post date:** [November 6, 2017, 6:58am UTC](https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437/3 "2017-11-06T06:58:12Z")

</div>

Colored output from eg testing frameworks etc. works fine, but things I echo from my make file rules don’t. For example, consider

```
       @echo "$(ccso)$(ccgreen)Finished unit tests of console app$(ccend)"

```

where

```
ccend = $(shell tput sgr0)
ccbold = $(shell tput bold)
ccgreen = $(shell tput setaf 2)
ccso = $(shell tput smso)

```

These colorings work fine on my local terminal. In CI log output, they seem to be being ignored completely.

---

<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:** [June 18, 2018, 11:32am UTC](https://discuss.circleci.com/t/how-do-i-echo-a-log-message-with-a-color/10437/4 "2018-06-18T11:32:25Z")

</div>


