[
https://issues.apache.org/jira/browse/SUREFIRE-1254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15462495#comment-15462495
]
ASF GitHub Bot commented on SUREFIRE-1254:
------------------------------------------
Github user Tibor17 commented on the issue:
https://github.com/apache/maven-surefire/pull/117
@hboutemy
Hi Herve, I will amend the commit. So one commit would still appear however
it is in progress. Surefire report has I think three place with logger only.
Maybe important to know. I use ConsoleLogger in with methods like
`debug/info/warning/errror` in in-plugin jvm and forked jvm as well. This was
here all the history of Surefire but I only extended with few more methods. The
implementations should be different in forked-jvm and simply, as higher design
principle was, the surefire providers are slaves and they only encode and send
a message to main process or receive a command to do. The main process does
what it has to do; either creates a report of displays message in console. From
the same principle in-plugin jvm is the only place where the ClassLoader should
see ANSI and MessageBuilder of m-shared-u. So this separation is safe because
such classes will never be loaded or failed to load in forked jvm and this
prevents me from having ugly jira issues. So I decided to use SPI to separate
implementation which is in surefire-common from surefire-api which is used
everywhere. The SPI is a builder of colored messages only.
So now we will have logs like `[INFO] Running MyTest` with colors instead
of `Running MyTest`.
Three advantages:
+ I fixed the issue you reported
https://issues.apache.org/jira/browse/SUREFIRE-1254
+ many people reported bug that Surefire writes anything in consolve, so
logger will again control the output and we don't have to add configuration
parameter in plugin which is good, thus we fixed
https://issues.apache.org/jira/browse/SUREFIRE-725 as well
+ and what I like is peace in code because as I told you before developers
come and go to Surefire and everybody solved his problem without maintaining
for long time. And that's the reason why logger was sometimes System.out, or
System.err, or ConsoleLogger or mojo logger. I like when the code has internal
principles that the attitude is just one; unlike use directly worked with
stream PrintWriter which was wrapped stream of System.out which disallowed you
to use normal logger like in Maven with slf4j and disallowed you to see
messages like `[INFO] ...` etc.
> add color messages
> ------------------
>
> Key: SUREFIRE-1254
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1254
> Project: Maven Surefire
> Issue Type: New Feature
> Components: Maven Failsafe Plugin, Maven Surefire Plugin
> Reporter: Hervé Boutemy
> Assignee: Tibor Digana
> Fix For: 2.19.2
>
>
> with MNG-3507 fixed, adding colors to tests results would improve readability
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)