How to programmatically access nlog variables like logDirectory?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to programmatically access nlog variables like logDirectory?

Omar
Hi, I'm a newbie with nLog and I would like to present in the help screen the information of several nlog settings - specifically most interested in in relaying where the current logDirectory is set to.  

I can get:
     var section = (NLog.Config.XmlLoggingConfiguration)ConfigurationManager.GetSection("nlog");

but from here I'm unable to drill to "logDirectory" FileName from like the "InnerList[2]" or from anywhere else.  What's the right way to get this info?
Loading...