I am using NLog in one of my projects and I am trying to compress the output of files. I tried to use the compression file attribute, but when I look at the files, they are not compressed.
Could you tell me what I can do wrong?
This is my configuration:
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<targets>
<target name="file" xsi:type="File" fileName="C:\Workspaces\log.xml"
layout="${message}" keepFileOpen="true"
archiveFileName = "C:\Workspaces\archived\log.{#####}.xml"
archiveAboveSize = "1048576" archiveNumbering = "Sequence"
fileAttributes="Compressed" concurrentWrites = "true"/>
</targets>
<rules>
<logger name ="*" minlevel="Debug" writeTo="file" />
</rules>
</nlo
g>
source
share