I have log4net set to log information to a couple of appenders one being the rolling file appender with the following configuration:
<appender name="AlchemyRollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="App_Data/logs/log-file.txt" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="1MB" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="date: [%date] thread: [%thread] AppDomain: [%appdomain] level: [%level] logger: [%logger] line: [%line] location: [%location] type: [%type] - message: %newline*******************************************************************%newline*****" />
</layout>
</appender>
Where you see 'message:' in the conversionPattern I used to have %message, but for the rolling file I only want a small amount of details. The other appenders will log more verbose information.
I removed the %message, but it keeps on adding the full exception message to the log file.
Any idea why?
I have tried:
- Rebuilding the project
- Resetting IIS
- Removing the %message
- Enabled internal logging and everything looks fine there