Back to Nlog

NLog GZipFile Target

src/NLog.Targets.GZipFile/README.md

6.1.3908 B
Original Source

NLog GZipFile Target

NLog File Target writing to file with GZip compression using GZipStream.

If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog

See the NLog Wiki for available options and examples.

Register Extension

NLog will only recognize type-alias GZipFile when loading from NLog.config-file, if having added extension to NLog.config-file:

xml
<extensions>
    <add assembly="NLog.Targets.GZipFile"/>
</extensions>

Alternative register from code using fluent configuration API:

csharp
LogManager.Setup().SetupExtensions(ext => {
   ext.RegisterTarget<NLog.Targets.GZipFileTarget>();
});