Scott Murphy Heiberg created GROOVY-12784:
---------------------------------------------
Summary: The shell Logger never prints ANSI colors because IO
looks for the old Jansi
Key: GROOVY-12784
URL: https://issues.apache.org/jira/browse/GROOVY-12784
Project: Groovy
Issue Type: Bug
Affects Versions: 6.0.0
Reporter: Scott Murphy Heiberg
{{org.codehaus.groovy.tools.shell.IO}} decides whether to render ANSI by
looking for {{org.fusesource.jansi.AnsiRenderWriter}}. Since GROOVY-8162 Groovy
ships JLine's Jansi ({{org.jline:jansi}}) instead, which has no such class, so
{{IO.ansiSupported}} is always {{false}} and the shell {{Logger}} (used by
groovydoc) never colors its DEBUG, WARN and ERROR prefixes, although {{Logger}}
already renders them with {{org.jline.jansi.Ansi}}.
{{IO}} should detect JLine's Jansi and render through its {{AnsiConsole}}, for
the JVM's own standard output and error only, so output redirected to a file or
a pipe stays plain. The {{jansi.mode}} system property ({{force}} / {{strip}})
still applies.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)