score:81

Accepted answer

have a try with this eclipse plugin: grep console

[update]:
as pointed out by commenters: when installing grep console in the currently last version of eclipse, you need to uncheck 'group items by category' in the install dialog to see the available items.
as pointed out by @line the plugin can now be easily installed via the eclipse marketplace again without changing any options.

[update 2]:
as pointed out by @azdev, to get proper highlighting:

entering just literal strings doesn't work. to get a line to be colored, you have to enclose the string in .* on either side, like so: .*error.*

score:0

emoji

you can use colors for text as others mentioned in their answers.

but you can use emojis instead! for example you can use you can use ⚠️ for warning messages and 🛑 for error messages to make them standing out!

or simply use these note books as a color:

📕: error message
📙: warning message
📗: ok status message
📘: action message
📓: canceled status message
📔: or anything you like and want to recognize immediately by color

i personally use meaningful emojis for different outputs.

authentication key: 🔑 
server error: 💣
etc.

🎁 bonus:

this method also helps you to quickly scan and find logs directly in the source code.

but linux default emoji font is not colorful by default and you may want to make them colorful, first.

score:1

you may consider trying apache chainsaw (http://logging.apache.org/chainsaw/index.html) if you are already working with log4j. lets you define colors and filtern and works with (nearly) zero configuration.

score:1

i've used this plugin before, it lets you colourize lines of the log based on customized regex.

for example, when i was using it, any lines with the words error would be red, warning would be orange, info would be blue... etc.

since it's regex, you could do anything. set it up to make the line green whenever it starts with ">>>" and then prepend your message string with ">>>".

http://sourceforge.net/projects/logfiletools

score:2

read about the org.eclipse.ui.console.consolepatternmatchlisteners extension point.

score:4

we use the ganymede eclipse plugin where i work, and it works well.

http://sourceforge.net/projects/ganymede/

"a log4j plugin to eclipse that works similar to chainsaw (socketserver). includes color, filtering, detailed information, and saves settings."

score:4

you can use ansi escape in console plugin for eclipse. you'll need this so the eclipse console can interpret ansi escape codes. install it and restart eclipse. then you can use ansi color codes to write in a certain color. here's a list of ansi color codes from another stackoverflow answer. then you can do this:

public static final string ansi_reset = "\u001b[0m";
public static final string ansi_red = "\u001b[31m";

public static void main(string[] args) {
    system.out.println(ansi_red + "this text is red!" + ansi_reset);
}

i used this to create a custom formatter for the console handler so it shows logs from logger in different levels with different colors (info logs in cyan, warning logs in yellow and severe logs in red). here's how i did it, if you're interested.

score:6

what about use logback and its property converter and log everything in log4j, that may allow you see the differents levels on differents colors.

good luck!

edit: the eclipse plugin

score:9

as already pointed out by @benjamin grep console is a great way to colorize output in the console.

i had made a short video to demonstrate how it worked and heard back from the creator of the grep console plugin. he mentioned that grep console 3 is has been released.

screen cast : http://www.youtube.com/watch?v=fxjggzaxtoc

update sites

grep console 2
http://eclipse.musgit.com
(requires eclipse 3.4 (ganymede) or higher and java 5.0 or higher)

grep console 3
http://eclipse.schedenig.name
(requires eclipse 3.7 (indigo) or higher and java 6.0 or higher)

score:19

actually the ansi console plugin adds ansi escape code support to eclipse console. at present it does have a limitation though, whereby escape codes that span multiple lines leak incorrectly to other lines when scrolling, see issue #3.

otherwise some terminal view plugin as explained in this other question might be an option for some.


Related Query

More Query from same tag