This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.1.x by this push:
     new 4f54e07  Get rid of kruft LogObject copy constructor. (#7553)
4f54e07 is described below

commit 4f54e078e3ff911b647a382b43c37aa1dd642a7b
Author: Walt Karas <wka...@verizonmedia.com>
AuthorDate: Thu Feb 25 17:00:28 2021 -0600

    Get rid of kruft LogObject copy constructor. (#7553)
    
    (cherry picked from commit a3666ee9c285abba2914b13e79db8a543941abae)
---
 proxy/logging/LogObject.cc | 49 ----------------------------------------------
 proxy/logging/LogObject.h  |  1 -
 2 files changed, 50 deletions(-)

diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index 55b5b76..82230b0 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -137,55 +137,6 @@ LogObject::LogObject(LogConfig *cfg, const LogFormat 
*format, const char *log_di
   Debug("log-config", "exiting LogObject constructor, filename=%s this=%p", 
m_filename, this);
 }
 
-LogObject::LogObject(LogObject &rhs)
-  : RefCountObj(rhs),
-    m_basename(ats_strdup(rhs.m_basename)),
-    m_filename(ats_strdup(rhs.m_filename)),
-    m_alt_filename(ats_strdup(rhs.m_alt_filename)),
-    m_flags(rhs.m_flags),
-    m_signature(rhs.m_signature),
-    m_rolling_enabled(rhs.m_rolling_enabled),
-    m_flush_threads(rhs.m_flush_threads),
-    m_rolling_interval_sec(rhs.m_rolling_interval_sec),
-    m_rolling_offset_hr(rhs.m_rolling_offset_hr),
-    m_rolling_size_mb(rhs.m_rolling_size_mb),
-    m_last_roll_time(rhs.m_last_roll_time),
-    m_max_rolled(rhs.m_max_rolled),
-    m_min_rolled(rhs.m_min_rolled),
-    m_reopen_after_rolling(rhs.m_reopen_after_rolling),
-    m_buffer_manager_idx(rhs.m_buffer_manager_idx),
-    m_pipe_buffer_size(rhs.m_pipe_buffer_size)
-{
-  m_format         = new LogFormat(*(rhs.m_format));
-  m_buffer_manager = new LogBufferManager[m_flush_threads];
-
-  if (rhs.m_logFile) {
-    m_logFile = new LogFile(*(rhs.m_logFile));
-
-    if (m_reopen_after_rolling) {
-      m_logFile->open_file();
-    }
-  } else {
-    m_logFile = nullptr;
-  }
-
-  LogFilter *filter;
-  for (filter = rhs.m_filter_list.first(); filter; filter = 
rhs.m_filter_list.next(filter)) {
-    add_filter(filter);
-  }
-
-  // copy gets a fresh log buffer
-  //
-  LogBuffer *b = new LogBuffer(Log::config, this, 
Log::config->log_buffer_size);
-  ink_assert(b);
-  SET_FREELIST_POINTER_VERSION(m_log_buffer, b, 0);
-
-  Debug("log-config",
-        "exiting LogObject copy constructor, "
-        "filename=%s this=%p",
-        m_filename, this);
-}
-
 LogObject::~LogObject()
 {
   Debug("log-config", "entering LogObject destructor, this=%p", this);
diff --git a/proxy/logging/LogObject.h b/proxy/logging/LogObject.h
index 7a6b817..9b57340 100644
--- a/proxy/logging/LogObject.h
+++ b/proxy/logging/LogObject.h
@@ -97,7 +97,6 @@ public:
             const char *header, Log::RollingEnabledValues rolling_enabled, int 
flush_threads, int rolling_interval_sec = 0,
             int rolling_offset_hr = 0, int rolling_size_mb = 0, bool 
auto_created = false, int rolling_max_count = 0,
             int rolling_min_count = 0, bool reopen_after_rolling = false, int 
pipe_buffer_size = 0);
-  LogObject(LogObject &);
   ~LogObject() override;
 
   void add_filter(LogFilter *filter, bool copy = true);

Reply via email to