Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

What does it mean if the attribute MaxFilesToRetain is set to 0 in MessageLogging policy ?

If we set the attribute MaxFilesToRetain to 0 in MessageLogging policy as shown below:

<MaxFilesToRetain>0</MaxFilesToRetain>

What does this mean ?

Does this mean that the same log file will be overwritten everytime the trigger happens with regard to TIME or SIZE (without creating new logs files) ?

Solved Solved
1 5 274
1 ACCEPTED SOLUTION

<MaxFilesToRetain>0</MaxFilesToRetain> 

  • If we specify 0 for the attribute MaxFilesToRetain, then the log files will be retained indefinitely. Rotation will happen depending on the rotation policy specified in the Message Logging Policy (read more about file rotation policy here), however, none of the files will be deleted.
  • If we continue logging, then it can possibly lead to disk full errors. We need to take appropriate measure to move the files frequently to a different server if we really want to use "0" for the above attribute.
  • It is preferred to use a suitable non zero value for the attribute MaxFilesToRetain to avoid disk full errors.

View solution in original post

5 REPLIES 5