If you only want the log files to log errors in the system, you need to set your logging level to ERROR
in the log4net setup.
<log4net>
<!-- The appenders will go here -->
<root>
<priority value="ERROR" />
<appender-ref ref="LogFileAppender" />
</root>
<logger name="Sitecore.Diagnostics.WebDAV" additivity="false">
<level value="ERROR" />
<appender-ref ref="WebDAVLogFileAppender" />
</logger>
<logger name="Sitecore.Diagnostics.Search" additivity="false">
<level value="ERROR" />
<appender-ref ref="SearchLogFileAppender" />
</logger>
<logger name="Sitecore.Diagnostics.Crawling" additivity="false">
<level value="ERROR" />
<appender-ref ref="CrawlingLogFileAppender" />
</logger>
<logger name="Sitecore.Diagnostics.Publishing" additivity="false">
<level value="ERROR" />
<appender-ref ref="PublishingLogFileAppender" />
</logger>
<logger name="Sitecore.FXM.Diagnostics" additivity="false">
<level value="ERROR" />
<appender-ref ref="FxmLogFileAppender" />
</logger>
</log4net>
If you want to disable a particular log file, set the level value to NONE
.
Bare in mind tho, setting the level to ERROR
will stop all info and warning entries from being logged, so you may miss important entries for debugging issues.