Log message color

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Log message color

Larner, Ross S
Hello. I am using the Commons Logging and I would like to find out the
way to change the color of the log messages that show up in the Eclipse
window. Previously I was using System.out.println, and the debug
messages were blue, while Exceptions were Red. Now both are red. Is
there a way to change the text color in commons-logging.properties?
Currently said file contains:

org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
org.apache.commons.logging.simplelog.defaultlog=trace

Thanks in advance,
Ross

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Log message color

robert burrell donkin
i suspect that this is really an eclipse question and i'd strongly
suggest asking on one of their user forums. if you want to continue
asking here, please read
http://wiki.apache.org/jakarta-commons/JakartaCommonsEtiquette and add
the correct prefix to the subject.

- robert

On Thu, 2005-06-09 at 14:12 -0400, Larner, Ross S wrote:

> Hello. I am using the Commons Logging and I would like to find out the
> way to change the color of the log messages that show up in the Eclipse
> window. Previously I was using System.out.println, and the debug
> messages were blue, while Exceptions were Red. Now both are red. Is
> there a way to change the text color in commons-logging.properties?
> Currently said file contains:
>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> org.apache.commons.logging.simplelog.defaultlog=trace
>
> Thanks in advance,
> Ross
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [logging] Log message color

Simon Kitching
In reply to this post by Larner, Ross S
On Thu, 2005-06-09 at 14:12 -0400, Larner, Ross S wrote:
> Hello. I am using the Commons Logging and I would like to find out the
> way to change the color of the log messages that show up in the Eclipse
> window. Previously I was using System.out.println, and the debug
> messages were blue, while Exceptions were Red. Now both are red. Is
> there a way to change the text color in commons-logging.properties?
> Currently said file contains:
>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
> org.apache.commons.logging.simplelog.defaultlog=trace

This is definitely a question that should be discussed on the eclipse
list, not the commons list. This colouring of messages must be something
done by eclipse as commons logging's SimpleLog just outputs plain text.

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [logging] Log message color

Jörg Schaible-2
In reply to this post by Larner, Ross S
Simon Kitching wrote on Friday, June 10, 2005 12:27 AM:

> On Thu, 2005-06-09 at 14:12 -0400, Larner, Ross S wrote:
>> Hello. I am using the Commons Logging and I would like to find out
>> the way to change the color of the log messages that show up in the
>> Eclipse window. Previously I was using System.out.println, and the
>> debug messages were blue, while Exceptions were Red. Now both are
>> red. Is there a way to change the text color in
>> commons-logging.properties? Currently said file contains:
>>
>>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleL
>> og
>> org.apache.commons.logging.simplelog.defaultlog=trace
>
> This is definitely a question that should be discussed on the
> eclipse list, not the commons list. This colouring of
> messages must be something done by eclipse as commons
> logging's SimpleLog just outputs plain text.

The difference is an output to stdout vs. stderr. He has to use a different logging implementation, where he can configure which log levels are printed to what output channel.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [logging] Log message color

Larner, Ross S
In reply to this post by Larner, Ross S
Jörg,
You are correct - the problem appears to be that SimpleLog is outputting to stderr, not stdout as System.out.println does. Is there another logging implementation that outputs to stdout instead?

Thanks,
Ross

-----Original Message-----
From: Jörg Schaible [mailto:[hidden email]]
Sent: Thursday, June 09, 2005 11:38 PM
To: Jakarta Commons Users List
Subject: RE: [logging] Log message color

Simon Kitching wrote on Friday, June 10, 2005 12:27 AM:

> On Thu, 2005-06-09 at 14:12 -0400, Larner, Ross S wrote:
>> Hello. I am using the Commons Logging and I would like to find out
>> the way to change the color of the log messages that show up in the
>> Eclipse window. Previously I was using System.out.println, and the
>> debug messages were blue, while Exceptions were Red. Now both are
>> red. Is there a way to change the text color in
>> commons-logging.properties? Currently said file contains:
>>
>>
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleL
>> og
>> org.apache.commons.logging.simplelog.defaultlog=trace
>
> This is definitely a question that should be discussed on the eclipse
> list, not the commons list. This colouring of messages must be
> something done by eclipse as commons logging's SimpleLog just outputs
> plain text.

The difference is an output to stdout vs. stderr. He has to use a different logging implementation, where he can configure which log levels are printed to what output channel.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: [logging] Log message color

Jörg Schaible-2
In reply to this post by Larner, Ross S
Larner, Ross S wrote on Friday, June 10, 2005 6:49 PM:

> Jörg,
> You are correct - the problem appears to be that SimpleLog is
> outputting to stderr, not stdout as System.out.println does.
> Is there another logging implementation that outputs to
> stdout instead?

You can utilize Log4J very easily to print log messages for different log levels to different streams. Commpns-Logging will use Log4J anyway if it is withing the classpath.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]