Hello all,

Sorry, I am a total outsider, and I am not quite sure it is polite to
stumble like this in your discussion.
But I have seen that the topic of colored output is pretty hot, mentioned
quite a bit in the last few days,
and (maybe) delaying the release.

So I come with my 2 cents, maybe I can help:
if this is the only show stopper, please release asap!
:-)

You now use slf4j, so there is a lot of flexibility on how to do things.
For instance adding colors is a 5 minute process, here it is:

Get the following 4 libraries:
slf4j-log4j12-1.7.2.jar, log4j-1.2.17.jar color-loggers-1.0.2.jar,
jansi-1.9.jar

========================
log4j-1.2.17.jar
    from http://logging.apache.org/log4j/1.2/download.html
    or
http://search.maven.org/remotecontent?filepath=log4j/log4j/1.2.17/log4j-1.2.17.jar

slf4j-log4j12-1.7.2.jar
    from http://slf4j.org/download.html
    or
http://search.maven.org/remotecontent?filepath=org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.jar

color-loggers-1.0.2.jar
    from https://github.com/mihnita/java-color-loggers/downloads
    or
https://github.com/downloads/mihnita/java-color-loggers/color-loggers-1.0.2.jar

jansi-1.9.jar
    from http://jansi.fusesource.org/download.html
    or
http://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.9/jansi-1.9.jar
========================

Create a minimal log4j.properties containing this:
========================
log4j.rootLogger=INFO, A1

log4j.appender.A1=com.colorlog.log4j.JansiColorConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.EnhancedPatternLayout
log4j.appender.A1.layout.ConversionPattern=[%5p] %m%n
========================
and put it in a .jar file (let's say log4j.properties.jar)

Or, if you trust me, you get the complete package from
    http://www.mihai-nita.net/tmp/ColorMaven-fullPack.zip
Or just the log4j.properties, more complete, with comments and all
    http://www.mihai-nita.net/tmp/log4j.properties

Now, go to a fresh build of maven, and in the lib folder delete
slf4j-simple-1.7.2.jar and dump the 5 jars above
(4 libraries + log4j.properties.jar)

Voila, colors!

There are also easy ways to get the colors in Eclipse, but let's take it
one at the time :-)
(http://www.mihai-nita.net/eclipse/ or
https://github.com/mihnita/ansi-econsole)

==========

Please let me know if there is anything I can help with
(publish color-loggers-1.0.2.jar to a maven repository, change groupId,
clarify license, whatever)

Thank you very much,
Mihai

Reply via email to