log4net is not saving to my log file

346 views Asked by At

I am trying to implement log4net into my project but I am unable to get the logger to save to the file I have set. I run the program and make sure that the log4net is catching some things and then I check the file after closing the application and its not there. What am I missing? I have a config.xml already but I did not want to put my configuration for log4net in there so I have this one. any help would be appreciated!

enter image description here

enter image description here

enter image description here

1

There are 1 answers

1
Ash Burlaczenko On BEST ANSWER

In your configuration you are tell root to use DebugAppender and LogFileAppender but the only appender in the config is RollingFileAppender.

Either add this as a root child

<appender-ref ref="RollingFileAppender" />

Or add further appender tags with names of DebugAppender and LogFileAppender.