Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<appender name="TracingAppenderFile" type="log4net.Appender.RollingFileAppender">
<file value=".\\\App_Data\\\Logs\" />
<datePattern value="yyyy-MM-dd'-TracingLogs.log'" />
<appendToFile value="true" />
<maximumFileSize value="256KB" />
<maxSizeRollBackups value="20" />
<rollingStyle value="Date" />
<staticLogFileName value="false" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<converter>
<name value="HTTPUser" />
<type value="hbulens.Logging.HttpContextUserPatternConverter" />
</converter>
<conversionPattern value="%level %date - %message - [%property{Category}] - [%HTTPUser] %newline" />
</layout>
<parameter>
<parameterName value="@Category" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%property{Category}" />
</layout>
</parameter>
<parameter>
<parameterName value="@User" />
<dbType value="String" />
<size value="255" />
</parameter>
</appender>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.