codeconsole opened a new pull request, #3309: URL: https://github.com/apache/groovy/pull/3309
https://issues.apache.org/jira/browse/GROOVY-12784 `IO` looked for `org.fusesource.jansi.AnsiRenderWriter`, which Groovy has not shipped since GROOVY-8162, so `ansiSupported` was always `false` and the shell `Logger` (groovydoc's logger) printed DEBUG, WARN and ERROR uncolored. `IO` now renders through JLine Jansi's `AnsiConsole`, for the JVM's own standard output and error only: - a terminal gets the colors (bold green DEBUG, bold red WARN and ERROR) - output redirected to a file or a pipe stays plain, since `AnsiConsole` strips the escape sequences there - `-Djansi.mode=force` / `strip` still override the detection - any other stream, or a `System.out` replaced after `AnsiConsole` captured the original, keeps a plain `PrintWriter` Jansi stays optional: `IO` checks for `org.jline.jansi.AnsiConsole` before touching it. Core's tests now run with the `logging` feature, as they already do with `grapes`, so `IOTest` can cover the redirected and the forced cases in a forked JVM. Opening the console builds JLine's system terminal, which sends JLine's usual terminal probes (DSR/DECRQM) and reads the replies itself, as groovysh does when it starts. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
