문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top