logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: log4net AdoNetAppender common connectionstring value
Date Fri, 03 Feb 2012 04:16:10 GMT
Maybe you could share a common App.Config between the two apps and use this to set the connection
string:

http://logging.apache.org/log4net/release/sdk/log4net.Appender.AdoNetAppender.ConnectionStringName.html



________________________________
 From: mmingfeilam <lam.m@comcast.net>
To: log4net-user@logging.apache.org 
Sent: Wednesday, February 1, 2012 7:16 PM
Subject: Re: log4net AdoNetAppender common connectionstring value
 


"
I do something along that line. I have a connection string inside
machine.config and I wrapped l4n in a wrapper dll that's used in many
projects. I actually deploy a logging config file alongside the wrapper, so
some of the code here is accessing settings inside that. The logging CN is
in machine.config because it's used elsewhere, as well.
 
So the wraper calls ConfigureLogging() from wrapper logging methods that I
expose. My apps don't actually deal with l4n directly. Each one simply
checks if initialization is needed before forwarding into l4n."
 
so you are doing this programmatically, is there a way to do it using the
configuration file, something along the line of:

<connectionString configSource="myConnectionStringFile" .../>
-- 
View this message in context: http://old.nabble.com/log4net-AdoNetAppender-common-connectionstring-value-tp33244792p33245873.html
Sent from the Log4net - Users mailing list archive at Nabble.com.
Mime
View raw message