I have just started using log4net and I can write to my c# application. I'm currently writing to the log file "c:\log.txt" Defined in my .config file, but I would like to set the log file name at runtime. Can anyone help me with this?
Loading
I have just started using log4net and I can write to my c# application. I'm currently writing to the log file "c:\log.txt" Defined in my .config file, but I would like to set the log file name at runtime. Can anyone help me with this?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal VaishyaPosted Nov 28, 2013, 6:04 AM
Jignesh TrivediPosted Nov 27, 2013, 11:13 PM
hi,
Please refer below link it might help you.
http://geekswithblogs.net/wpeck/archive/2009/10/08/setting-log4net-fileappender.file-at-runtime.aspx
http://www.munsplace.com/blog/2007/02/10/changing-the-log-file-location-at-runtime-with-log4net/
http://classpattern.com/log4net-dynamic-log-path.html#.UpbC4D66bIU
Nitin BhardwajPosted Nov 27, 2013, 8:47 AM
Satyapriya NayakPosted Nov 27, 2013, 8:39 AM