Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top