Skip to content

Instantly share code, notes, and snippets.

@trentmswanson
Created March 6, 2015 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trentmswanson/410859e6961ed1c81240 to your computer and use it in GitHub Desktop.
Save trentmswanson/410859e6961ed1c81240 to your computer and use it in GitHub Desktop.
log4net transform to replace file appender with trace appender
<?xml version="1.0"?>
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=301874 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
<log4net>
<appender name="DataAccessLogFile" type="log4net.Appender.TraceAppender" xdt:Transform="SetAttributes(type)" xdt:Locator="Match(name)" >
<file xdt:Transform="Remove" />
<appendToFile xdt:Transform="Remove" />
<maximumFileSize xdt:Transform="Remove" />
<maxSizeRollBackups xdt:Transform="Remove" />
</appender>
</log4net>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment