On Sep 5, 2014, at 2:59 PM, Brian Rectanus <brect...@gmail.com> wrote:
> All, > > I have a pull request in that is a trivial patch to add a long missing > TSTextLogObjectRollingSizeMbSet(int rolling_size_mb) API function to allow > setting the rolling size of custom log objects. This API just wraps the > existing TextLogObject::set_rolling_size_mb(int rolling_size_mb) which is > used internally to set the log rolling size as you can through > records.config (proxy.config.log.rolling_size_mb) and in the > logs_xml.config (<RollingSizeMb = "size_in_MB"/>). All other rolling > functions are already exposed in the API, but this one was missing and I > have need to use it in the IronBee project (github.com/ironbee) for our > custom log. There should be no ABI or compatibility issues as this is just > the addition of a function. Look forward to your comments. > > This is TS-3059: https://issues.apache.org/jira/browse/TS-3059 > Pull request #107: https://github.com/apache/trafficserver/pull/107 > Patch: https://github.com/apache/trafficserver/pull/107.patch > > Simple addition of: > > /** > Set the rolling size. rolling_size_mb specifies the size in MB when > log rolling > should take place. > */ > tsapi void TSTextLogObjectRollingSizeMbSet(TSTextLogObject the_object, int > rolling_size_mb); According to LogObject::_setup_rolling(), the minimum for rolling_size_mb is 10. I think that this API should return TSReturnCode, and fail if "the_object" is NULL, or "rolling_size_mb" is less than the minimum. Otherwise, this looks fine to me. J