Allow interception of AnsiConsole's output
NilsRenaud opened this issue · 2 comments
This commit : 57aa84d
Has replaced System.out
and System.err
by FileDescriptor.out
and FileDescriptor.err
.
Although this seems related to Windows support, it is now impossible to test AnsiConsole when integrated in a project. This is why Logback project is stuck in version 1.18 of JANSI.
As an example, here is a PR trying to upgrade JANSI version in logback : https://github.com/qos-ch/logback/pull/542/files
A possible solution could be to specify the PrintStream
to use to AnsiConsole, or to use System.out
/System.err
back instead of FileDescriptor
's one.
@gnodet could you please explain the choice of using FileDescriptor.out/err
instead of System.out/err
?
Is it possible to come back to System.out/err
?
Thanks in advance !
It's not really doable. However, your test can be fixed with the following: gnodet/logback@e60cd35