- Author
-
Nicolas Hurion
- Copyright
-
Copyright © 2012 by Nicolas Hurion
- License
-
Distribute under the Apache License
Color log is a simple tool that will take a file and display it, with some lines colored in three different colors, based on some regular expression.
Default behavior will show in:
-
green lines containing “success”
-
yellow lines containing “warning”
-
red lines containing “error” or “failure” and not containing “tests”
My initial need when I created this small tool was to spot warnings in the middle of all the output of maven. This should explain the default Regexp used.
Example usage:
mvn clean install | colorlog
Install ruby. If on windows go to ruby installer
Once installed
gem install colorlog
Or on windows
gem install colorlog windows-pr win32console
You can then use
mvn clean install | colorlog
And if it is too long for you, create a file mvnc.bat that you put somewhere in your path with the following content:
@echo off mvn %* | colorlog
And you can then use
mvnc clean install
See help for usage
colorlog --help