Module Log.Rotation

module Rotation: sig .. end

type t = {
   messages :int option;
   size :Core.Std.Byte_units.t option;
   time :(Core.Std.Time.Ofday.t * Core.Std.Time.Zone.t) option;
   keep :[ `All | `At_least of int | `Newer_than of Core.Std.Time.Span.t ];
   naming_scheme :[ `Numbered | `Timestamped ];
}
description of boundaries for file rotation.

If all fields are None the file will never be rotated. Any field set to Some will cause rotation to happen when that boundary is crossed. Multiple boundaries may be set. Log rotation always causses incrementing rotation conditions (e.g. size) to reset.

The condition keep is special and does not follow the rules above. When a log is rotated keep is examined and logs that do not fall under its instructions are deleted. This deletion takes place on rotation only, and so may not happen. The meaning of keep options are:

WARNING: The rotating file functionality of Log is the most poorly tested, and in many ways the most complex. Before using this mode in anger you should test failure cases carefully.
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t