Question : One question about Log4Net & Common.Logging

Dear All,

We know the follow settings in the xml configuration file could set the max size of main log file to be 2MB. And if it exceeds size limit, then create at most 10 backups.

My question is: how can we setup the max size of each of these 10 backup files? Do they have a default size limit?

Thanks heaps!
Code Snippet:
1:
2:

    

Answer : One question about Log4Net & Common.Logging

The max size of each backup file is 2MB.
log4net allows the main log file to grow up to 2MB, then renames it as the backup file, and starts with an empty main log file. It will continue doing so until there are 10 backup files. When there are 10 backup file, and the main log file needs to be rolled over, the oldest backup file is deleted.

http://logging.apache.org/log4net/release/sdk/log4net.Appender.RollingFileAppender.MaxFileSize.html
Random Solutions  
 
programming4us programming4us