<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
  </configSections>
  <nlog autoReload="true" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <targets>
      <target name="logfile" xsi:type="File" fileName="${basedir}/log/${shortdate}.txt" layout="CandidateApp: ${date:format=MM-dd-yyyy HH\:mm\:ss} ${message} ${newline}-----------" />
      <target name="logmail" xsi:type="Mail" html="true"
              subject="CandidateApp Error - ${date:format=MM-dd-yyyy HH\:mm\:ss}"
              body="Date: ${date:format=MM-dd-yyyy HH\:mm\:ss} ${newline}${newline} Level: ${level:uppercase=true} ${newline}${newline} Message: ${message}"
              replaceNewlineWithBrTagInHtml="true"
              to="youremail@provider.com"
              from="info@yoursite.com"
              encoding="UTF-8"
              enableSsl="false"
              smtpAuthentication="Basic"
              smtpUserName=""
              smtpPassword=""
              smtpServer="yoursite.com"
              timeout="20000" />
    </targets>

    <rules>
      <logger name="*" minlevel="Info" writeTo="logfile" />
      <!--<logger name="*" minlevel="Info" writeTo="logmail" />-->
    </rules>
  </nlog>
</configuration>
