How to disable creation of empty log file on app start?
问题 I have configured log4net in my app successfully but one thing is a little bit annoying for me. The log file is created (empty) after my app start even if no error occurs. I would like to log file be created only after some error. 回答1: I actually found a way to do this in this thread: http://www.l4ndash.com/Log4NetMailArchive/tabid/70/forumid/1/postid/18271/view/topic/Default.aspx I've tested the first method and it works. Just in case that link is not longer good I'll reproduce the code here