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: [email protected]
For additional commands, e-mail: [email protected]