Repository: trafficserver
Updated Branches:
  refs/heads/master d8798d915 -> 9e46e4e19


TS-3059: Add missing TSTextLogObjectRollingSizeMbSet API function.

This closes #107


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/494344e4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/494344e4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/494344e4

Branch: refs/heads/master
Commit: 494344e4b2fae568528409a2244e91b760fe3f8a
Parents: d8798d9
Author: Brian Rectanus <[email protected]>
Authored: Thu Sep 4 23:28:29 2014 -0500
Committer: James Peach <[email protected]>
Committed: Fri Sep 19 13:58:45 2014 -0700

----------------------------------------------------------------------
 doc/reference/api/TSTextLogObjectCreate.en.rst            | 1 +
 doc/sdk/plugin-management/guide-to-the-logging-api.en.rst | 3 +++
 proxy/InkAPI.cc                                           | 8 ++++++++
 proxy/api/ts/ts.h                                         | 7 +++++++
 4 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/494344e4/doc/reference/api/TSTextLogObjectCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSTextLogObjectCreate.en.rst 
b/doc/reference/api/TSTextLogObjectCreate.en.rst
index 8a4684b..a3265aa 100644
--- a/doc/reference/api/TSTextLogObjectCreate.en.rst
+++ b/doc/reference/api/TSTextLogObjectCreate.en.rst
@@ -36,6 +36,7 @@ Synopsis
 .. function:: TSReturnCode TSTextLogObjectRollingEnabledSet(TSTextLogObject 
the_object, int rolling_enabled)
 .. function:: void TSTextLogObjectRollingIntervalSecSet(TSTextLogObject 
the_object, int rolling_interval_sec)
 .. function:: void TSTextLogObjectRollingOffsetHrSet(TSTextLogObject 
the_object, int rolling_offset_hr)
+.. function:: void TSTextLogObjectRollingSizeMbSet(TSTextLogObject the_object, 
int rolling_size_mb)
 
 Description
 ===========

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/494344e4/doc/sdk/plugin-management/guide-to-the-logging-api.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/plugin-management/guide-to-the-logging-api.en.rst 
b/doc/sdk/plugin-management/guide-to-the-logging-api.en.rst
index 1471be7..e38c4d5 100644
--- a/doc/sdk/plugin-management/guide-to-the-logging-api.en.rst
+++ b/doc/sdk/plugin-management/guide-to-the-logging-api.en.rst
@@ -41,6 +41,9 @@ The logging API enables you to:
 -  Set the rolling offset for your custom text log: see
    :c:func:`TSTextLogObjectRollingOffsetHrSet`
 
+-  Set the rolling size for your custom text log: see
+   :c:func:`TSTextLogObjectRollingSizeMbSet`
+
 -  Write text entries to the custom text log: see
    :c:func:`TSTextLogObjectWrite`
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/494344e4/proxy/InkAPI.cc
----------------------------------------------------------------------
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index a0cc73d..f03e848 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -6901,6 +6901,14 @@ TSTextLogObjectRollingOffsetHrSet(TSTextLogObject 
the_object, int rolling_offset
   ((TextLogObject *) the_object)->set_rolling_offset_hr(rolling_offset_hr);
 }
 
+void
+TSTextLogObjectRollingSizeMbSet(TSTextLogObject the_object, int 
rolling_size_mb)
+{
+  sdk_assert(sdk_sanity_check_iocore_structure(the_object) == TS_SUCCESS);
+
+  ((TextLogObject *) the_object)->set_rolling_size_mb(rolling_size_mb);
+}
+
 TSReturnCode
 TSHttpSsnClientFdGet(TSHttpSsn ssnp, int *fdp)
 {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/494344e4/proxy/api/ts/ts.h
----------------------------------------------------------------------
diff --git a/proxy/api/ts/ts.h b/proxy/api/ts/ts.h
index e00aa68..d28a7b7 100644
--- a/proxy/api/ts/ts.h
+++ b/proxy/api/ts/ts.h
@@ -2126,6 +2126,13 @@ extern "C"
   tsapi void TSTextLogObjectRollingOffsetHrSet(TSTextLogObject the_object, int 
rolling_offset_hr);
 
   /**
+      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);
+
+  /**
       Async disk IO read
 
       @return TS_SUCCESS or TS_ERROR.

Reply via email to