Escape chars printed raw in partial console output since 0.7.0
See original GitHub issueEscape chars printed raw in partial console output since 0.7.0 (works ok in 0.6.3)
Test environment
- Jenkins Version:
2.222.3 - AnsiColor Version:
0.7.0 - Hostsystem:
Linux x64
Expected behavior
I would expect the colors/format to appear correctly when/if Jenkins console truncates long output (/console) and not only when the full output is displayed (/consoleFull).

Actual behavior
The escape sequences are printed raw on truncated console output.
[clicking Full Log link displays the expected behavior]
Steps to reproduce the behavior
Any output that colorizes the output and is truncated by jenkins console doesn’t seem to be working as expected.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:9
Top Results From Across the Web
Javascript - How to show escape characters in a string?
How can I show escape characters when printing in Javascript? Example: str = "Hello\nWorld"; console.log(str);. Gives:
Read more >Reference - Nginx.org
Since 0.7.4, the method accepts escaped URIs. r.log( string ): writes a string to the error log on the info level of logging....
Read more >Keyboard Control - mpv.io
Escaping spaces and other special characters. Keep in mind that the shell will partially parse and mangle the arguments you pass to mpv....
Read more >Ammonite
Ammonite REPL now prints an additional newline after the output of each command, which should visually separate each command and make it easier...
Read more >ASCI escape codes shown literally in Jenkins build output
That seems to be for PR 176 which has been released in 0.7.0. From the Jenkins raw console log viewed with vim: That...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you for the report. I had a lot of trouble trying to reproduce this.
Turns out this happens for Jenkins instances which never had a default, global
ansicoloroptions set. My test box had (even if they are all re-set to defaults now) and this prevented me from encountering the bug.This means that a dirty, short-term solution is to set a global color map and then immediately remove it.
I don’t have much free time at the moment but will try to come up with a permanent fix in the coming days.
For those of you which use Configuration as Code to manage Jenkins, here’s the config snippet that enables the global color map:
Maybe setting the global color map name to the empty string will also fix the problem.