# How to turn off the color marking in the log?

**URL:** <https://discuss.elastic.co/t/how-to-turn-off-the-color-marking-in-the-log/288897>\
**Category:** Logs\
**Created:** [November 10, 2021, 2:40pm UTC](https://discuss.elastic.co/t/how-to-turn-off-the-color-marking-in-the-log/288897 "2021-11-10T14:40:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![klacabane](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/klacabane/32/97514_2.png) [@klacabane](https://discuss.elastic.co/u/klacabane)\
**Post date:** [November 24, 2021, 3:04pm UTC](https://discuss.elastic.co/t/how-to-turn-off-the-color-marking-in-the-log/288897/2 "2021-11-24T15:04:22Z")

</div>

Hi @wajika,

You could use a filebeat processor to remove the ANSI codes from the log entries. The [script processor](https://www.elastic.co/guide/en/beats/filebeat/current/processor-script.html) looks like a good option here.  
An alternative would be to use an ingest pipeline with the [Gsub processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/gsub-processor.html#gsub-processor).  
For the replacement logic, you can try one of the following regex to find a replace the codes:

- [fluent-plugin-color-stripper/out\_color\_stripper.rb at d0b04940c14a612cb78a8a3a5537e40bb558b9a1 · mattheworiordan/fluent-plugin-color-stripper · GitHub](https://github.com/mattheworiordan/fluent-plugin-color-stripper/blob/d0b04940c14a612cb78a8a3a5537e40bb558b9a1/lib/fluent/plugin/out_color_stripper.rb#L36)
- [python - Filtering out ANSI escape sequences - Stack Overflow](https://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences/33925550#33925550)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-turn-off-the-color-marking-in-the-log/288897)._
