Hi,
I've got the following settings.
These should create 5 backups files every hour. It's not happening. It's
creating only two (MyLogFile.log and MyLogFile.log.1). But if I change
rollingStyle to 'Size' and remove the datePattern it's creating 5
backups.
<appender name="RollingFile"
type="log4net.Appender.RollingFileAppender">
<file value="d:\\LOGTEST\\MyLogFile.log" />
<appendToFile value="true" />
<maximumFileSize value="10KB" />
<rollingStyle value="Composite"/>
<datePattern value="yyyyMMdd-HH" />
<maxSizeRollBackups value="5" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern
value="%d{ISO8601}|%-5p|%t|%c:%L|Message : %m%n" />
</layout>
</appender>
My requirement is to get the daily logs into separate backups so that a
single huge file should not get created. Like today I want to have all
the logs into infinite number of backup files. Also the same I want for
every day. So that at any time I can check yesterday's nth back up. In
other words all the backups should be persisting for everyday.
Please tell me what would be the best possible settings. If it's not
feasible then let me know what's the event gets fired while archiving.
Regards,
Arindam Sinha
Programmer Analyst
Cendant Hotels ISG-AIS Maint
Extn - 2218,VNET- 32218
Floor - II,Wing - C
This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing
or copying of this email or any action taken in reliance on this e-mail is
strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com