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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to