i using xquisoft.logging log errors in application. in web.config, can set size of log file, path, , level. don't know how set number of backups of log files. example, want keep 2 log files @ same time. when log file reaches size limit, new log file created. once new log file reaches size limit, first 1 should deleted automatically , log file should generated. inputs appreciated.
<configuration> <configsections> <sectiongroup name="xquisoft.logging"> <section name="log" type="xquisoft.logging.logconfiguration, xquisoft.logging"/> <section name="filtermanager" type="xquisoft.logging.filterconfiguration, xquisoft.logging"/> </sectiongroup> </configsections> <appsettings> <add key="currentenvironment" value="build"/> </appsettings> <xquisoft.logging> <log> <providers> <add name="build" type="xquisoft.logging.bufferedlogprovider, xquisoft.logging" targetprovidernames="filelogger-build" outputinterval="2" exclusiveenvironmentname="build" exceptionprovidername="null"/> <add name="filelogger-build" type="xquisoft.logging.rollingfilelogprovider, xquisoft.logging" filepath="d:\logs\build\log" extension=".txt" maximumfilesize="10mb" activeroot="false" exceptionprovidername="null" itemformat="{timestamp:yyyymmdd:hhmmss}: {level}: {source}: {category}: {message}: {details}" filtername="verbose"/> </providers> </log> <filtermanager> <providers> <add name="verbose" type="xquisoft.logging.levelfilter, xquisoft.logging" maxlevel="verbose"/> <add name="errorsandwarnings" type="xquisoft.logging.levelfilter, xquisoft.logging" maxlevel="warning"/> </providers> </filtermanager> </xquisoft.logging>
i found adding attribute maximumfilecount can limit number of log files.
Comments
Post a Comment