Change appengine console color to red in eclipse
the appengine console for local development logs is an eye pain red (like a bunch of bugs !!!) by default. How can I change this to standard black for normal log and red for error? If I right click on the console and go to preference the setting is correct: standard black and red.
+3
source to share
2 answers
Note one year later: I no longer use 'java.util.logging'. I had a strange error when my thread stopped in the "log ()" method. It was probably a dead castle. I switched to "Log4j".
To have errors written in red and information in black in the eclipse console, you can create your own ConsoleHandler:
public class MyConsoleHandler extends StreamHandler {
private java.util.logging.Formatter formatter = new SimpleFormatter();
public void publish(LogRecord record){
if(record.getLevel().intValue() < Level.WARNING.intValue())
System.out.println(formatter.formatMessage(record));
else
System.err.println(formatter.format(record));
}
}
and use it with:
java.util.logging.LogManager.getLogManager().reset();
java.util.logging.Logger.getLogger("").addHandler(new MyConsoleHandler())
+2
source to share