{"repo":"mihnita/java-color-loggers","free":true,"listed":false,"github":"https://github.com/mihnita/java-color-loggers","clone":"git clone https://github.com/mihnita/java-color-loggers.git","description":"Color console logging for log4j and jdk","language":"Java","stars":39,"topics":["java","logging","color","colorization"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"java-color-loggers ================== Color console logging for log4j and jdk Usage Download the latest color-loggers jar from releases or build them yourself Download jansi-1.18.jar - optional, see below ( jansi-1.18 is the latest one at this time, but I use nothing fancy, so I don't expect surprises with other versions) Make sure the jar(s) mentioned above are somewhere in the classpath (whatever method you are using for your project) On Mac OS X, Linux, UNIX, most (all?) the consoles support ANSI escapes. ANSI escapes work out of the box in Windows 10. On older Windows versions you can use the ConEmu console, or the standard Windows console with ansicon and the AnsiColorConsole flavors of the loggers. But if you want the standard Windows console without ansicon , then you should use JAnsiColorConsole and you also need jansi . There are pros and cons for each option, I hope to write an article when I have some time. --- JDK (or JUL, java.util.logging ) In the java logging configuration file (default in $JAVA HOME/lib/logging.properties ) use com.mihnita.colorlog.jdk.AnsiColorConsoleHandler or com.mihnita.colorlog.jdk.JAnsiColorConsoleHandler as handler. They work the same as java.util.logging.ConsoleHandler . See an example in src/test/resources/logJdk.properties --- Log4j In log4j.properties (or whatever config file you use for log4j) use com.mihnita.colorlog.log4j.AnsiColorConsoleAppender or com.mihnita.colorlog.log4j.JAnsiColorConsoleAppender as appender. They work the s","default_branch":null,"files":null,"tree":[],"storefront":"/r/mihnita","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mihnita/java-color-loggers/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}