Updated Branches: refs/heads/master d10479ed1 -> 6aa87ff56
TS-2255: TS should not flood printing after log space reach the limit Signed-off-by: Yunkai Zhang <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6aa87ff5 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6aa87ff5 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6aa87ff5 Branch: refs/heads/master Commit: 6aa87ff56fb729e2863b34f3e7da8b8680b462fc Parents: d10479e Author: Yunkai Zhang <[email protected]> Authored: Fri Sep 27 14:47:45 2013 +0800 Committer: Yunkai Zhang <[email protected]> Committed: Sun Sep 29 11:16:44 2013 +0800 ---------------------------------------------------------------------- CHANGES | 6 ++++-- proxy/logging/LogConfig.cc | 6 ++++++ proxy/logging/LogObject.cc | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 782a38a..b14b9c3 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 4.1.0 - *) TS-2245: cancel the trigger of CacheVC in openWriteCloseDataDone + *) [TS-2255] TS should not flood printing after log space reach the limit. - *) TS-2232: log level should be change from Status to Debug. + *) [TS-2245] cancel the trigger of CacheVC in openWriteCloseDataDone. + + *) [TS-2232] log level should be change from Status to Debug. Author: Yu Qing <[email protected]> *) [TS-2201] split drainIncomingChannel two thread, one handle Broadcast http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/proxy/logging/LogConfig.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc index 8fc0ece..d9810ce 100644 --- a/proxy/logging/LogConfig.cc +++ b/proxy/logging/LogConfig.cc @@ -1629,6 +1629,9 @@ LogConfig::update_space_used() if (!space_to_write(headroom)) { + if (!logging_space_exhausted) + Note("Logging space exhausted, any logs writing to local disk will be dropped!"); + logging_space_exhausted = true; // // Despite our best efforts, we still can't write to the disk. @@ -1673,6 +1676,9 @@ LogConfig::update_space_used() // // We have enough space to log again; clear any previous messages // + if (logging_space_exhausted) + Note("Logging space is no longer exhausted."); + logging_space_exhausted = false; if (m_disk_full || m_partition_full) { Note("Logging disk is no longer full; " "access logging to local log directory resumed."); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6aa87ff5/proxy/logging/LogObject.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc index 089c8eb..f68e1b7 100644 --- a/proxy/logging/LogObject.cc +++ b/proxy/logging/LogObject.cc @@ -527,7 +527,7 @@ LogObject::log(LogAccess * lad, char *text_entry) // likewise, send data to a remote client even if local space is exhausted // (if there is a remote client, m_logFile will be NULL if (Log::config->logging_space_exhausted && !writes_to_pipe() && m_logFile) { - Note("logging space exhausted, can't write to:%s, drop this entry", m_logFile->m_name); + Debug("log", "logging space exhausted, can't write to:%s, drop this entry", m_logFile->m_name); return Log::FULL; } // this verification must be done here in order to avoid 'dead' LogBuffers
