Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java.Util.Logging Color Output in IDE

Reply
Thread Tools

Java.Util.Logging Color Output in IDE

 
 
Symz
Guest
Posts: n/a
 
      03-23-2005
Hi comp.java

Can someone please explain the different colors I see in my Eclipse console
when I use java.util.logging. Also, how does one configure this? I seem to
recall this happening in JDeveloper as well so I assume this is a logging
feature and would like to use it properly.

I have a straight forward property file in both a Tomcat and normal console
based app. The color for the Tomcat app output is blue regardless of level
and red for the console app (regardles of level).

I can't seem to google effectlively to get the answer.

Apologies if this is the wrong newsgroup.


 
Reply With Quote
 
 
 
 
Roland
Guest
Posts: n/a
 
      03-23-2005
On 23-3-2005 17:57, Symz wrote:
> Hi comp.java
>
> Can someone please explain the different colors I see in my Eclipse console
> when I use java.util.logging. Also, how does one configure this? I seem to
> recall this happening in JDeveloper as well so I assume this is a logging
> feature and would like to use it properly.
>
> I have a straight forward property file in both a Tomcat and normal console
> based app. The color for the Tomcat app output is blue regardless of level
> and red for the console app (regardles of level).
>
> I can't seem to google effectlively to get the answer.
>
> Apologies if this is the wrong newsgroup.
>
>


The Eclipse output console renders output to System.out in blue, and
output to System.err in red. Keyboard input for System.in is rendered in
green. It further somehow parses the output to make class references in
a stack trace act as a hyperlink (so a click shows the source at the
proper line number).

IIRC, the default console handler of java.util.logging prints messages
to System.err, and therefor Eclipse renders them red. Maybe Tomcat logs
its messages to System.out (rendered blue).
--
Regards,

Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
 
Reply With Quote
 
 
 
 
Symz
Guest
Posts: n/a
 
      03-23-2005
Aha.

" IIRC, the default console handler of java.util.logging prints messages
to System.err, and therefor Eclipse renders them red. Maybe Tomcat logs
its messages to System.out (rendered blue)."

That rings a bell. Out of interest, do you know how to go to redirect
System.err to System.out for java.util.logging?

Thanks Roland,

Cheers Simon.


 
Reply With Quote
 
Roland
Guest
Posts: n/a
 
      03-23-2005
On 23-3-2005 18:23, Roland wrote:

> On 23-3-2005 17:57, Symz wrote:
>
>> Hi comp.java
>>
>> Can someone please explain the different colors I see in my Eclipse
>> console
>> when I use java.util.logging. Also, how does one configure this? I
>> seem to
>> recall this happening in JDeveloper as well so I assume this is a logging
>> feature and would like to use it properly.
>>
>> I have a straight forward property file in both a Tomcat and normal
>> console
>> based app. The color for the Tomcat app output is blue regardless of
>> level
>> and red for the console app (regardles of level).
>>
>> I can't seem to google effectlively to get the answer.
>>
>> Apologies if this is the wrong newsgroup.
>>
>>

>
> The Eclipse output console renders output to System.out in blue, and
> output to System.err in red. Keyboard input for System.in is rendered in
> green. It further somehow parses the output to make class references in
> a stack trace act as a hyperlink (so a click shows the source at the
> proper line number).
>
> IIRC, the default console handler of java.util.logging prints messages
> to System.err, and therefor Eclipse renders them red. Maybe Tomcat logs
> its messages to System.out (rendered blue).


Another addition: the colors are IDE specific. In Eclipse 3.0 they can
be configured in Window -> Preferences -> Run/Debug -> Console.


--
Regards,

Roland de Ruiter
, ___ ___
/__/ w_/ /__/
/ \ /_/ / \
 
Reply With Quote
 
Symz
Guest
Posts: n/a
 
      03-23-2005
> That rings a bell. Out of interest, do you know how to go to redirect
> System.err to System.out for java.util.logging?


Only seems possible if you subclass the consolehandler and set the stream
via the protected setOutputStream method, like

class myConsoleHandler extends ConsoleHandler {
public myConsoleHandler() {
super();
this.setOutputStream(System.out);
}
}

Any other suggestions?



 
Reply With Quote
 
tzvika.barenholz@gmail.com
Guest
Posts: n/a
 
      03-24-2005
not to be the smartass, but just use log4j and define the appenders as
you like them

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
IDE/SATA and IDE/ATA controller mdnchauhan Software 0 05-19-2008 05:30 AM
[IDE] - The Dynamic Opportunity - ActiveState Komodo IDE / Open Source Ilias Lazaridis Python 6 01-28-2006 09:42 PM
Python IDE like NetBeans/Delphi IDE fowlertrainer@anonym.hu Python 5 04-06-2005 05:56 AM
enhanced ide vs ide AndyPaul Computer Information 1 01-01-2004 03:30 AM



Advertisments