<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwExceptions="false"
internalLogLevel="Off" internalLogFile="${basedir}\App_Data\Logs\nlog-internal.log" >
<extensions>
<add assembly="Abp.Logging.NLog"/>
<add assembly="Microsoft.ApplicationInsights.NLogTarget" />
</extensions>
<variable name="logDir" value="${basedir}/App_Data/Logs"/>
<variable name="logArchiveDir" value="${basedir}/App_Data/Logs/Archives"/>
<targets>
<target name="Sql" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target xsi:type="File"
fileName="${logDir}/${shortdate}_sql_vm01.log"
layout="${longdate}|log:${logger}|thr:${threadid}|${uppercase:${level}}|usr:${abp-user-id}|ten:${abp-tenant-id}|${message}"
keepFileOpen="false"
archiveFileName="${logArchiveDir}/{#}_sql_vm01.txt"
archiveNumbering="DateAndSequence"
archiveAboveSize="5000000"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="7"
concurrentWrites="true"/>
</target>
<target xsi:type="Null" name="Disabled" formatMessage="false" layout="" />
<target name="Synchronization" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target xsi:type="File"
fileName="${logDir}/${shortdate}_sync.log"
layout="${longdate}|log:${logger}|thr:${threadid}|${uppercase:${level}}|usr:${abp-user-id}|ten:${abp-tenant-id}|${message}"
keepFileOpen="false"
archiveFileName="${logArchiveDir}/{#}_sync.txt"
archiveNumbering="DateAndSequence"
archiveAboveSize="5000000"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="7"
concurrentWrites="true"/>
</target>
<target name="SynchronizationAlerts" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target xsi:type="Mail"
to="support@opti-q.com"
from="noreply@testportal.opti-q.com"
useSystemNetMailSettings="true"
layout="${longdate} ${uppercase:${level}} ${callsite:className=true:includeSourcePath=true:methodName=true} ${message}${newline}"
/>
</target>
<target name="Jobs" xsi:type="AsyncWrapper" queueLimit="500" overflowAction="Block">
<target xsi:type="File"
fileName="${logDir}/${shortdate}_jobs_vm01.log"
layout="${longdate}|log:${logger}|thr:${threadid}|${uppercase:${level}}|usr:${abp-user-id}|ten:${abp-tenant-id}|${message}"
keepFileOpen="false"
archiveFileName="${logArchiveDir}/{#}_jobs_vm01.txt"
archiveNumbering="DateAndSequence"
archiveAboveSize="5000000"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="7"
concurrentWrites="true"/>
</target>
<target name="JobAlerts"
xsi:type="BufferingWrapper"
slidingTimeout="true"
bufferSize="300"
flushTimeout="300000">
<target xsi:type="Mail"
to="support@opti-q.com"
cc=""
from="noreply@testportal.opti-q.com"
useSystemNetMailSettings="true"
layout="${longdate} ${uppercase:${level}} ${callsite:className=true:includeSourcePath=true:methodName=true} ${message}${newline}"
/>
</target>
<target name="Trace" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target xsi:type="File"
fileName="${logDir}/${shortdate}_trace_vm01.log"
layout="${longdate}|log:${logger}|thr:${threadid}|${uppercase:${level}}|usr:${abp-user-id}|ten:${abp-tenant-id}|${message}"
keepFileOpen="false"
archiveFileName="${logArchiveDir}/{#}_trace_vm01.txt"
archiveNumbering="DateAndSequence"
archiveAboveSize="5000000"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="7"
concurrentWrites="true"/>
</target>
<target name="Error" xsi:type="AsyncWrapper" queueLimit="5000" overflowAction="Discard">
<target xsi:type="File"
fileName="${logDir}/${shortdate}_error_vm01.log"
layout="${longdate}|log:${logger}|thr:${threadid}|${uppercase:${level}}|usr:${abp-user-id}|ten:${abp-tenant-id}|${message}
${exception:format=toString,Data:maxInnerExceptionLevel=10}"
keepFileOpen="false"
archiveFileName="${logArchiveDir}/{#}_error_vm01.txt"
archiveNumbering="DateAndSequence"
archiveAboveSize="5000000"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
maxArchiveFiles="7"
concurrentWrites="true" />
</target>
<target name="aiTarget" xsi:type="ApplicationInsightsTarget" />
</targets>
<rules>
<logger name="Sql*" minlevel="Debug" writeTo="Disabled" final="true" />
<logger name="Hangfire*" minlevel="Error" writeTo="Jobs" final="true" />
<logger name="Hangfire*" minlevel="Debug" writeTo="Disabled" final="true" />
<logger name="Synchronization*" minlevel="Debug" writeTo="SynchronizationAlerts" final="false" />
<logger name="Synchronization*" minlevel="Debug" writeTo="Synchronization" final="true" />
<logger name="*" minlevel="Warn" writeTo="aiTarget" />
<logger name="*" minlevel="Error" writeTo="Error" />
<logger name="*" minlevel="Debug" writeTo="Disabled" />
</rules>
</nlog>