Plugins (1077)


Training and Consulting (43)



EPIC Poll

What is your favourite developer portal?

[ Results | Polls ]

Votes: 539
Comments: 0

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
pdemilly
Post subject: How to set a Level  PostPosted: May 06, 2004 - 09:57 AM
Guest





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
 
   
Reply with quote Back to top
Log4E
Post subject: Re: How to set a Level  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
alitari
Post subject: Re: How to set a Level  PostPosted: May 07, 2004 - 07:41 AM
Guest





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?
 
   
Reply with quote Back to top
Log4E
Post subject:   PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
Guest
Post subject:   PostPosted: 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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits