You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Su...@hyperion.com on 2003/02/21 22:29:21 UTC

Configuration question

Hi,

  I as wondering if we can define some properties in one file and read some
from other file.
We have 4 servers that we configure through log4j, we have same Level,
Pattern layout for
but different output files. So, my question is can we define level and
layout in one common file
and then read output file name separately?

Thanks so much.

Regards,
Sumedha



************************************************************************

If you received this e-mail in error please delete it and notify the sender as soon as possible. The contents of this e-mail may be confidential and the unauthorized use, copying, or dissemination of it and any attachments to it, is prohibited.

Internet communications are not secure and Hyperion does not, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses. The views expressed here do not necessarily represent those of Hyperion.

For more information about Hyperion, please visit our Web site at www.hyperion.com

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: Configuration question

Posted by Shorn Tolley <sh...@yahoo.co.uk>.
Hi Sumedha,

Just to paraphrase:
You're trying to start completely separate JVMs, using
the same log4j config file, but you want to have log
output for each of the separate JVMs go to a different
file?  Is that right?

I think one way to do this might be with variable
substitution.  I've never used it before, but
apparently the log4j configuration functionality
understands variable substition for Java system
properties.

So define the location of log file as a variable, then
set that variable to the location to log to based on
which JVM you're starting.  You could have batch files
or sheel scripts for starting you're separate JVMs
(you probably alread do :)

Should be easy; but like I said, I've never used the
variable stuff before - I just remember reading
something about it on the mailing list ages ago. 
(Just looked it up - the syntax is provided in the
PropertyConfigurator javadoc)

Cheers,
Shorn.


 --- Sumedha_Gupta@hyperion.com wrote: > Hi,
> 
>   I as wondering if we can define some properties in
> one file and read some
> from other file.
> We have 4 servers that we configure through log4j,
> we have same Level,
> Pattern layout for
> but different output files. So, my question is can
> we define level and
> layout in one common file
> and then read output file name separately?
> 
> Thanks so much.
> 
> Regards,
> Sumedha


http://mobile.yahoo.com.au - Yahoo! Mobile
- Exchange IMs with Messenger friends on your Telstra or Vodafone mobile phone.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org