Enables/disables rolling for a log object..
INKReturnCode INKTextLogObjectRollingEnabledSet (
INKTextLogObject the_object, int *rolling_enabled)
INKTextLogObject
the_object
is the log object for which you want to
enable/disable rolling.
To enable rolling, set int rolling_enabled
to 1; to disable rolling, set to 0.
This API must be used once the object is created (using
INKTextLogObjectCreate
) and before writing
into logs (using INKTextLogObjectWrite
). If
INKTextLogObjectRollingEnabledSet
is not
called, then the default value (specified in
records.config
by the parameter
proxy.config.log2.rolling_enabled
) is used.
The rolling interval and offset can be specified via the
APIs INKTextLogObjectRollingIntervalSecSet
and
INKTextLogObjectRollingOffsetHrSet
.
If rolling is enabled, then the rolling interval is set to 21600 sec (6 hours) and the offset hour set to 0 (midnight). Thus, the logs will be rolled at 0:00am (midnight), 06:00am, 12:00pm, and 18:00pm each day.
Note | |
---|---|
If the maximum amount of disk space reserved for logs is
exhausted and if parameter
|
INK_SUCCESS
if the API is called
successfully.
INK_ERROR
if an error occurs while calling
the API or if an argument is invalid.