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 srinivas ramgopal <sk...@yahoo.com> on 2007/12/06 04:30:45 UTC

Datasource settings in config file for jdbcappender.

Hi all,

A newbie question - Is there a way to avoid hard coding of the database
connection values in the JDBCAppender in log4j.xml? In other words, can a
datasource be referenced in log4j.xml?

Any pointers to code snippets is highly appreciated.

Thanks in advance for yout valuable input.

-- 
View this message in context: http://www.nabble.com/Datasource-settings-in-config-file-for-jdbcappender.-tf4953810.html#a14185699
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: Datasource settings in config file for jdbcappender.

Posted by Curt Arnold <ca...@apache.org>.
On Dec 5, 2007, at 9:30 PM, srinivas ramgopal wrote:

>
> Hi all,
>
> A newbie question - Is there a way to avoid hard coding of the  
> database
> connection values in the JDBCAppender in log4j.xml? In other words,  
> can a
> datasource be referenced in log4j.xml?
>
> Any pointers to code snippets is highly appreciated.
>
> Thanks in advance for yout valuable input.
>


You can use ${SYSTEMPROPERTYNAME} in parameter values to replace with  
the value of a system property.

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