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 Harinath Mallepally <ha...@careerscale.in> on 2014/08/03 19:34:58 UTC

Log4j2 property file (external)

Hi,

can you please help on this query?

I would like to have the file paths etc specified in a property file which
could be environment specific.

as I see properties within the xml file like this.

	<properties>
		<property name="name">app</property>

	</properties>

can we just have these properties in a seperate file and link the file
in log4j2.xml?


Thanks
Harinath Mallepally
harinath@careerscale.in
Careerscale IT Consulting LLP
+91 9391920444 / 040-42100276
Hyderabad

Re: Log4j2 property file (external)

Posted by Ralph Goers <ra...@dslextreme.com>.
Please open a Jira issue for this enhancement. It makes sense to add an optional attribute to the properties element to allow you to specify the location of the file.  

However, you should be able to use XInclude to include a separate XML file that has just the <properties> element and its children in it right now.

Ralph

On Aug 3, 2014, at 10:34 AM, Harinath Mallepally <ha...@careerscale.in> wrote:

> Hi,
> 
> can you please help on this query?
> 
> I would like to have the file paths etc specified in a property file which
> could be environment specific.
> 
> as I see properties within the xml file like this.
> 
> 	<properties>
> 		<property name="name">app</property>
> 
> 	</properties>
> 
> can we just have these properties in a seperate file and link the file
> in log4j2.xml?
> 
> 
> Thanks
> Harinath Mallepally
> harinath@careerscale.in
> Careerscale IT Consulting LLP
> +91 9391920444 / 040-42100276
> Hyderabad


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