Logging/Tracing-Lib for .Net -
i need swap log4net other logging library has build-in functionality @ least these requirements:
- filelogging (text)
- archiving size , date (no archive should ever deleted)
- archiving zip/compressed file
- possibility configure archiving in way, have 1 zip file per day
i did try of major libraries nlog , smartinspect none offer functions move archived/rolled files zip file.
for log4net did implement functionality myself new project customer not want use log4net...
would possible extend nlog nlog.extended this? or know other lib allready has "features" (free or commercial)?
thanks in advance
rene
rene - serilog's free , has simple model plugging in sinks. i'd recommend copying source of rollingfilesink
class github repository, , adding few lines of code zip "outgoing" file on roll.
plugging custom sink in easy:
var log = new loggerconfiguration() .writeto.sink(new zippedrollingfilesink("c:\\logs\\myapp-{date}.txt")) .createlogger();
Comments
Post a Comment