Skip to content

Commit

Permalink
Changed nlog config
Browse files Browse the repository at this point in the history
  • Loading branch information
C1rdec committed Dec 5, 2024
1 parent c03c177 commit 4d210e0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/PoeLurker.UI/nlog.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variable name="LogDirectory" value="${basedir}/logs" />
<targets>
<target xsi:type="File" name="logfile" fileName="logs/log.txt" layout="${longdate} ${level:uppercase=true} ${message}" />
<target xsi:type="Console" name="logconsole" layout="${longdate} ${level:uppercase=true} ${message}" />
<target name="file" xsi:type="File">
<fileName>${LogDirectory}/${date:format=yyyy-MM-dd}.log</fileName>
<layout xsi:type="SimpleLayout">
<text>[${date:format=yyyy/MM/dd HH\:mm\:ss.fff}] ${level:padding=-5} [${threadid}] ${message}${onexception:inner=${newline}${exception:format=tostring:maxInnerExceptionLevel=10:innerExceptionSeparator=Inner exception\:}} (${logger})</text>
</layout>
</target>
<!--<target name="console" xsi:type="Console" layout="${message}${onexception:inner=${newline}${exception:format=message:maxInnerExceptionLevel=0:innerExceptionSeparator=&#xD;&#xA;Inner exception\:&#xD;&#xA;}}" />-->
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="logconsole,logfile" />
<logger name="*" minlevel="Debug" writeTo="file" />
</rules>
</nlog>

0 comments on commit 4d210e0

Please sign in to comment.