I have a service running hourly that uses NLog to send mail when exception occurs. So how do I configure it to not log at Saturday and Sunday? Can I even do that?
Here's my target:
<target name="m"
xsi:type="Mail"
html="true"
smtpServer="*******"
smtpPort="*******"
smtpAuthentication="*******"
smtpUserName="*******"
smtpPassword="*******"
enableSsl="true"
subject="Exception"
from="*******"
to="*******"
layout ="${longdate} ${uppercase:${level}}${newline} ${callsite:className=true:includeSourcePath=true:methodName=true}${newline} ${message}${newline}"
useSystemNetMailSettings="false" />
And rule:
<logger name="*" minlevel="Fatal" writeTo="m" />