I have a requirement to log to different log file using Nlog based different asp.net folder
ex if Root/Folder1/ page.aspx–> should write to log1.log file
if Root/Folder2/page.aspx ---> should write to log2.log file
i tried using different web.config file for different folders but nlog is picking up only Root level config any ideas ?
Most likely you maintain namespaces in your asp.net code to match folder tree. That said, you can use wildcards in
name(class-type namespace and name) setting for a logger. See this: http://nlog-project.org/wiki/Configuration_file#Rules