You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2014/09/19 22:59:53 UTC
[1/3] git commit: TS-3059: Add missing
TSTextLogObjectRollingSizeMbSet API function.
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 <br...@qualys.com>
Authored: Thu Sep 4 23:28:29 2014 -0500
Committer: James Peach <jp...@apache.org>
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.
[3/3] git commit: Add TS-3059 to CHANGES
Posted by jp...@apache.org.
Add TS-3059 to CHANGES
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9e46e4e1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9e46e4e1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9e46e4e1
Branch: refs/heads/master
Commit: 9e46e4e19e07515e8df89079604b6a65b93fb9c5
Parents: 8bc3f7e
Author: James Peach <jp...@apache.org>
Authored: Fri Sep 19 13:48:59 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Fri Sep 19 13:59:16 2014 -0700
----------------------------------------------------------------------
CHANGES | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9e46e4e1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 539d672..bccfff6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 5.2.0
+ *) [TS-3059] Add the TSTextLogObjectRollingSizeMbSet API function.
+ Author: Brian Rectanus <br...@qualys.com>
+
*) [TS-3081] FetchSM needs to notify body done, when no more read bytes in the buffer.
*) [TS-2945] Add target port number support to the balancer plugin.
[2/3] git commit: TS-3059: clip invalid log rolling size when it gets
set
Posted by jp...@apache.org.
TS-3059: clip invalid log rolling size when it gets set
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8bc3f7ed
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8bc3f7ed
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8bc3f7ed
Branch: refs/heads/master
Commit: 8bc3f7ed8f517145e355d37f64f4066dc272ec2e
Parents: 494344e
Author: James Peach <jp...@apache.org>
Authored: Fri Sep 19 13:47:02 2014 -0700
Committer: James Peach <jp...@apache.org>
Committed: Fri Sep 19 13:59:16 2014 -0700
----------------------------------------------------------------------
proxy/logging/LogObject.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8bc3f7ed/proxy/logging/LogObject.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.h b/proxy/logging/LogObject.h
index 07c90e7..917718c 100644
--- a/proxy/logging/LogObject.h
+++ b/proxy/logging/LogObject.h
@@ -180,7 +180,7 @@ public:
void set_rolling_size_mb(int rolling_size_mb)
{
- m_rolling_size_mb = rolling_size_mb;
+ _setup_rolling(m_rolling_enabled, m_rolling_interval_sec, m_rolling_offset_hr, rolling_size_mb);
}
bool is_collation_client() const { return (m_logFile ? false : true); }