I'm trying to pull up database connection string credentials from template config file for my Nlog connection string, I tried doing it somehow it's not working, any suggestions would appreciate
<target name="database" connectionString=":ConnectionStringSTR" xsi:type="Database" keepConnection="false" useTransactions="true" commandType="Text" dbProvider="Oracle.DataAccess.Client" commandText="insert into LOG (LogName,LogDetails) values (:LogName,:LogDetails)"><parameter name="LogName" layout="${event-context:item=LogName}" /><parameter name="LogDetails" layout="${event-context:item=LogDetails}" /></target>
Below under resource tag I created a credential variable which will generate connection string with respective username and password
<Properties><Property Name="ConnectionStringSTR" Value="Data Source=ABCD100;User Id=NLOGUSER;Password=NLOG12345;Persist Security Info=false"/><Property Name="ConnectionTimeout" Value="15"/></Properties>
This is not working as records are not getting inserted in DB.How to configure this values - connectionString=":ConnectionStringSTR"