Repository: trafficserver Updated Branches: refs/heads/master 03a2950ac -> 4bd4b0159
TS-2770: let proxy.config.log.rolling_interval_sec be as low as 60sec Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4bd4b015 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4bd4b015 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4bd4b015 Branch: refs/heads/master Commit: 4bd4b0159bd5832b6a8a2b5a4d9c170c38383f04 Parents: 03a2950 Author: James Peach <[email protected]> Authored: Tue Apr 29 13:46:35 2014 -0700 Committer: James Peach <[email protected]> Committed: Wed Apr 30 21:04:18 2014 -0700 ---------------------------------------------------------------------- CHANGES | 2 ++ .../LC_MESSAGES/reference/configuration/records.config.en.po | 4 ++-- doc/reference/configuration/records.config.en.rst | 2 +- proxy/logging/Log.h | 4 ++-- proxy/logging/LogObject.cc | 8 ++++---- 5 files changed, 11 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4bd4b015/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 9aa1f0b..84d86c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.0.0 + *) [TS-2770] Allow proxy.config.log.rolling_interval_sec to be as low as 60sec. + *) [TS-2763] Remove the unused proxy.config.log.xuid_logging_enabled config setting. *) [TS-2762] Core dump when benchmarking SPDY http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4bd4b015/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po ---------------------------------------------------------------------- diff --git a/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po b/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po index dccbd7a..373a6e3 100644 --- a/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po +++ b/doc/locale/ja/LC_MESSAGES/reference/configuration/records.config.en.po @@ -2602,8 +2602,8 @@ msgstr "" #: ../../reference/configuration/records.config.en.rst:1792 msgid "" -"The log file rolling interval, in seconds. The minimum value is ``300`` (5 " -"minutes). The maximum, and default, value is 86400 seconds (one day)." +"The log file rolling interval, in seconds. The minimum value is ``60`` (1 " +"minute). The maximum, and default, value is 86400 seconds (one day)." msgstr "" #: ../../reference/configuration/records.config.en.rst:1794 http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4bd4b015/doc/reference/configuration/records.config.en.rst ---------------------------------------------------------------------- diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst index c29691b..2855034 100644 --- a/doc/reference/configuration/records.config.en.rst +++ b/doc/reference/configuration/records.config.en.rst @@ -1854,7 +1854,7 @@ server, refer to `logs_xml.config <logs_xml.config>`_. .. ts:cv:: CONFIG proxy.config.log.rolling_interval_sec INT 86400 :reloadable: - The log file rolling interval, in seconds. The minimum value is ``300`` (5 minutes). The maximum, and default, value is 86400 seconds (one day). + The log file rolling interval, in seconds. The minimum value is ``60`` (1 minute). The maximum, and default, value is 86400 seconds (one day). .. note:: If you start Traffic Server within a few minutes of the next rolling time, then rolling might not occur until the next rolling time. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4bd4b015/proxy/logging/Log.h ---------------------------------------------------------------------- diff --git a/proxy/logging/Log.h b/proxy/logging/Log.h index fed3801..38f1ab7 100644 --- a/proxy/logging/Log.h +++ b/proxy/logging/Log.h @@ -406,8 +406,8 @@ public: enum { - // 5 minute minimum rolling interval - MIN_ROLLING_INTERVAL_SEC = 300 + MIN_ROLLING_INTERVAL_SEC = 60, // 5 minute minimum rolling interval + MAX_ROLLING_INTERVAL_SEC = 86400 // 24 hrs rolling interval max }; // main interface http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4bd4b015/proxy/logging/LogObject.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc index fbc1aa3..c67b1a0 100644 --- a/proxy/logging/LogObject.cc +++ b/proxy/logging/LogObject.cc @@ -675,16 +675,16 @@ LogObject::_setup_rolling(Log::RollingEnabledValues rolling_enabled, int rolling if (rolling_interval_sec < Log::MIN_ROLLING_INTERVAL_SEC) { // check minimum m_rolling_interval_sec = Log::MIN_ROLLING_INTERVAL_SEC; - } else if (rolling_interval_sec > 86400) { + } else if (rolling_interval_sec > Log::MAX_ROLLING_INTERVAL_SEC) { // 1 day maximum - m_rolling_interval_sec = 86400; - } else if (86400 % rolling_interval_sec == 0) { + m_rolling_interval_sec = Log::MAX_ROLLING_INTERVAL_SEC; + } else if (Log::MAX_ROLLING_INTERVAL_SEC % rolling_interval_sec == 0) { // OK, divides day evenly m_rolling_interval_sec = rolling_interval_sec; } else { m_rolling_interval_sec = rolling_interval_sec; // increase so it divides day evenly - while (86400 % ++m_rolling_interval_sec); + while (Log::MAX_ROLLING_INTERVAL_SEC % ++m_rolling_interval_sec); } if (m_rolling_interval_sec != rolling_interval_sec) {
