How do I eliminate duplicate logging in log4net?
Try with this change, setting additivity to false.
<root>
<level value="WARN" />
<appender-ref ref="Console" />
<appender-ref ref="LogFile" />
</root>
<logger name="myprogram" additivity="false">
<level value="INFO" />
<appender-ref ref="Console" />
<appender-ref ref="LogFile" />
</logger>
You are getting duplicated because you are telling it to log messages twice. I wouldn't recommend using additivity here since you might experience some side effects, simply remove unnecessary configuration:
<root>
<level value="WARN" />
<appender-ref ref="Console" />
<appender-ref ref="LogFile" />
</root>
<logger name="myprogram">
<level value="INFO" />
</logger>
You don't need to indicate the appender-ref in the logger myprogram since it will inherit them from the root logger; if you specify them again it will log twice.