Hi Curt

Thanks. does this work in an xml configuration file also? I could not get it
to work so far. 

thanks
andy

-----Original Message-----
From: Curt Arnold [mailto:curt.ar...@gmail.com] On Behalf Of Curt Arnold
Sent: Mittwoch, 25. Mai 2011 05:56
To: Log4J Users List
Subject: Re: Set Root Log Level on command line

You can specify a system property on the command line and expand it in the
configuration.


java -DrootLevel=INFO ...

and in your configuration file do:

log4j.rootLogger=${rootLevel}


On May 23, 2011, at 2:58 PM, Andy Flury wrote:

> Hi All
> 
> 
> 
> Is there a way to set the root log level on the command line?
> 
> 
> 
> We have an application that runs either in Simulation mode or in Live
mode.
> Depending on the mode, the log level needs to be debug or error. It 
> would be very inconvenient to have two different log4j config files, 
> because all other settings will be constant.
> 
> 
> 
> thanks for your help
> 
> andy flury
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to