• Post Reply Bookmark Topic Watch Topic
  • New Topic

Colored Output to Console  RSS feed

 
Glen Divers
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I notice within Eclipse, output written to the Console via the logging framework uses red text, whilst output from System.out.println uses black text. Does anyone have any idea how to set the color of the text when writing to System.out. My current project includes the debugging of traffic over the serial port which I'm doing by writing to System.out at the moment and it would make life so much easier if I could highlight specific responses.

Regards
 
Eoin Mac Aoidh
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Eclipse
From the menu, Window >preferences>run/debug>console...make your choice!

Eoin
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipses coloring is done by the IDE, not the logger; in other words, it says "Oh, this is from err, use red."
 
Anjaneyulu Mannam
Greenhorn
Posts: 5
Java Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download jansi-1.4.jar and set classpath and then Try This code 100% working :

 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anjaneyulu Mannam wrote:Download jansi-1.4.jar and set classpath and then Try This code 100% working :

That looks good, but which classes are those static members imported from? Where is that .jar available?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!