Add nlog.config
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
|||||||
|
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<targets>
|
||||||
|
<target xsi:type="File"
|
||||||
|
name="fileTarget"
|
||||||
|
fileName="logs/logfile_${shortdate}.log"
|
||||||
|
archiveFileName="logs/logfile_{#}.log"
|
||||||
|
archiveAboveSize="52428800"
|
||||||
|
archiveNumbering="DateAndSequence" <!-- Использование динамической логики архивации -->
|
||||||
|
archiveDateFormat="yyyyMMdd"
|
||||||
|
maxArchiveFiles="100"
|
||||||
|
maxArchiveDays="2"
|
||||||
|
layout="${longdate} ${logger} ${level} ${message}"
|
||||||
|
enableArchiveFileCompression="false" <!-- Отключить сжатие, если не нужно -->
|
||||||
|
keepFileOpen="false"
|
||||||
|
concurrentWrites="true"
|
||||||
|
openFileCacheTimeout="30" />
|
||||||
|
</targets>
|
||||||
|
|
||||||
|
<rules>
|
||||||
|
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||||
|
</rules>
|
||||||
|
</nlog>
|
||||||
Reference in New Issue
Block a user