| Author |
Message |
|
|
Post subject: How to set a Level
Posted: May 06, 2004 - 09:57 AM
|
|
|
|
Hi,
How do I set the running Level?
I am using the org.apache.commons.logging implementation. What do I need to do now to setup a running Level (DEBUG for example) and select the output for the logger.
TIA
Pascal |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: How to set a Level
Posted: May 06, 2004 - 10:16 AM
|
|

Joined: May 05, 2004
Posts: 6
|
|
Log4E does not configure your logger at the moment. You have to set the level for yourself. The Jakarta Commons Logging framework is a wrapper of the underlying logging framework of your choice, e.g. Log4j. Thus you need to define the level in your log4j.properties if you're using that logger.
See for more at the newly added "Getting Startet" section at http://log4e.jayefem.de |
|
|
| |
|
|
|
 |
|
|
Post subject: Re: How to set a Level
Posted: May 07, 2004 - 07:41 AM
|
|
|
|
| Log4E wrote: | Log4E does not configure your logger at the moment. You have to set the level for yourself. The Jakarta Commons Logging framework is a wrapper of the underlying logging framework of your choice, e.g. Log4j. Thus you need to define the level in your log4j.properties if you're using that logger.
See for more at the newly added "Getting Startet" section at http://log4e.jayefem.de |
Most Logger-API provide setting ( and changing) a Logging-Level at runtime. Wouldn't it be desirable to provide this in the wrapper- class too? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 07, 2004 - 08:03 AM
|
|

Joined: May 05, 2004
Posts: 6
|
|
| Quote: | | Most Logger-API provide setting ( and changing) a Logging-Level at runtime. Wouldn't it be desirable to provide this in the wrapper- class too? |
Would be nice. I couldn't find it in the API though. Jakarta Commons Logging is not part of Log4E. You might want to send a feature request to them.
BTW: I moved the description of initial setup of particcualar logger to the FAQ of my plugins page. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: May 07, 2004 - 09:17 PM
|
|
|
|
Actually I found that you need to setup 2 files or more depending of the underlying implementation. For the common-logging you first define a commons-logging.properties file where you define what underlying logger you use. Then you need to define the default property file for that logger where you can define the debug level.
Anyway, having look at that logging issue a little deeper I think that AOP via AspectJ is a better solution for me to this problem. See the following link: http://www.developer.com/java/other/art ... _3109831_2
Maybe you can incorporate it in your plugin which BTW is wonderful and do what you advertise it should do.
Thanks for all your god work.
Pascal |
|
|
| |
|
|
|
 |
|
|
| |