Skip to content

Instantly share code, notes, and snippets.

@benerdin
Created May 28, 2013 19:34
Show Gist options
  • Select an option

  • Save benerdin/5665455 to your computer and use it in GitHub Desktop.

Select an option

Save benerdin/5665455 to your computer and use it in GitHub Desktop.
NLog Configuration
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<extensions>
<add assembly="Assembly.Namespace" />
</extensions>
<targets>
<target xsi:type="Debugger" name="Debugger" />
<target xsi:type="Mail" name="Mailer" html="true" addNewLines="true" to="[email protected]" bcc="" cc="" from="&quot;Brian Federici&quot; &lt;[email protected]&gt;" smtpUserName="smtpUser" enableSsl="false" smtpPassword="smtpPassword" smtpAuthentication="Basic" smtpServer="192.168.1.100" smtpPort="25" />
<target xsi:type="File" name="file" layout="${longdate} ${logger} ${message}" fileName="${basedir}/${level}.log" />
</targets>
<rules>
<logger name="*" minlevel="Debug" writeTo="Debugger" />
<logger name="*" minlevel="Warn" writeTo="Mailer" />
<logger name="*" minlevel="Info" writeTo="file" />
</rules>
</nlog>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment