LoggerMaxSize Property |
Namespace: MailBee
This property can be set to prevent unlimited growth of the log file. When MaxSize is set to certain positive integer value, the log size will never exceed this value (unless it's not too small so that even one log entry would not fit).
If the memory log is used and the log size is going to exceed MaxSize value, the oldest half of the log is removed (the removal occurs on the entry boundaries so that individual entries are not splitted).
If the file log is used and the log size is going to exceed MaxSize value, the log file is renamed into OldFilename name and then cleared (or just cleared if OldFilename property is not set).
The developer may also call Clear method to clear the log.
Note |
---|
The log size limitation is a character count, not byte count. When using logging into a file, some characters can be converted into multi-byte sequences (especially, if UTF8 encoding is used), so that the log file size in bytes may get larger than MaxSize value. |