commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [logging] How do I change logging levels at run time?
Date Mon, 11 Aug 2003 01:27:51 GMT
On Mon, 11 Aug 2003 dion@multitask.com.au wrote:

> Date: Mon, 11 Aug 2003 11:12:10 +1000
> From: dion@multitask.com.au
> Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> To: commons-user@jakarta.apache.org
> Subject: [logging] How do I change logging levels at run time?
>
> I've got a application (maven) that uses commons logging.
>
> We have a command line switch (-debug) that I'd like to set the logging
> level for everything to 'debug'.
>
> Is this possible with commons-logging, or must we use log4j to do this?

You'll need to use your underlying logging system's configuration
mechanism for stuff like this.

If you're using the simple logger that is built in to commons-logging, you
can probably accomplish this by calling System.setProperty() on the
appropriate property names.

> --
> dIon Gillard, Multitask Consulting
> Blog:      http://blogs.codehaus.org/people/dion/
>

Craig


Mime
View raw message