trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [1/8] trafficserver git commit: TS-974: Partial Object Caching.
Date Mon, 29 Jun 2015 11:47:50 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/poc-6-0-x [created] 528eab64a


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/Log.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/Log.cc b/proxy/logging/Log.cc
index 332131b..84149c4 100644
--- a/proxy/logging/Log.cc
+++ b/proxy/logging/Log.cc
@@ -130,9 +130,12 @@ Log::change_configuration()
   ink_mutex_release(prev->log_object_manager._APImutex);
   Debug("log-api-mutex", "Log::change_configuration released api mutex");
 
-  // Register the new config in the config processor; the old one will now be scheduled for
a
-  // future deletion. We don't need to do anything magical with refcounts, since the
-  // configProcessor will keep a reference count, and drop it when the deletion is scheduled.
+  // Register the new config in the config processor; the old one will now be
+  // scheduled for a
+  // future deletion. We don't need to do anything magical with refcounts, since
+  // the
+  // configProcessor will keep a reference count, and drop it when the deletion
+  // is scheduled.
   configProcessor.set(log_configid, new_config);
 
   // If we replaced the logging configuration, flush any log
@@ -516,11 +519,12 @@ Log::init_fields()
     SQUID_LOG_ERR_FUTURE_1, "ERR_FUTURE_1", SQUID_LOG_ERR_UNKNOWN, "ERR_UNKNOWN");
 
   Ptr<LogFieldAliasTable> cache_hit_miss_map = make_ptr(new LogFieldAliasTable);
-  cache_hit_miss_map->init(23, SQUID_HIT_RESERVED, "HIT", SQUID_HIT_LEVEL_1, "HIT_RAM",
// Also SQUID_HIT_RAM
-                           SQUID_HIT_LEVEL_2, "HIT_SSD",                                //
Also SQUID_HIT_SSD
-                           SQUID_HIT_LEVEL_3, "HIT_DISK",                               //
Also SQUID_HIT_DISK
-                           SQUID_HIT_LEVEL_4, "HIT_CLUSTER",                            //
Also SQUID_HIT_CLUSTER
-                           SQUID_HIT_LEVEL_5, "HIT_NET",                                //
Also SQUID_HIT_NET
+  cache_hit_miss_map->init(23, SQUID_HIT_RESERVED, "HIT", SQUID_HIT_LEVEL_1,
+                           "HIT_RAM",                        // Also SQUID_HIT_RAM
+                           SQUID_HIT_LEVEL_2, "HIT_SSD",     // Also SQUID_HIT_SSD
+                           SQUID_HIT_LEVEL_3, "HIT_DISK",    // Also SQUID_HIT_DISK
+                           SQUID_HIT_LEVEL_4, "HIT_CLUSTER", // Also SQUID_HIT_CLUSTER
+                           SQUID_HIT_LEVEL_5, "HIT_NET",     // Also SQUID_HIT_NET
                            SQUID_HIT_LEVEL_6, "HIT_LEVEL_6", SQUID_HIT_LEVEL_7, "HIT_LEVEL_7",
SQUID_HIT_LEVEL_8, "HIT_LEVEL_8",
                            SQUID_HIT_LEVEl_9, "HIT_LEVEL_9", SQUID_MISS_NONE, "MISS", SQUID_MISS_ICP_AUTH,
"MISS_ICP_AUTH",
                            SQUID_MISS_HTTP_NON_CACHE, "MISS_HTTP_NON_CACHE", SQUID_MISS_ICP_STOPLIST,
"MISS_ICP_STOPLIST",
@@ -1098,8 +1102,9 @@ Log::flush_thread_main(void * /* args ATS_UNUSED */)
       //
       while (total_bytes - bytes_written) {
         if (Log::config->logging_space_exhausted) {
-          Debug("log", "logging space exhausted, failed to write file:%s, have dropped (%d)
bytes.", logfile->get_name(),
-                (total_bytes - bytes_written));
+          Debug("log", "logging space exhausted, failed to write file:%s, have "
+                       "dropped (%d) bytes.",
+                logfile->get_name(), (total_bytes - bytes_written));
 
           RecIncrRawStat(log_rsb, mutex->thread_holding, log_stat_bytes_lost_before_written_to_disk_stat,
                          total_bytes - bytes_written);
@@ -1232,7 +1237,9 @@ Log::collate_thread_main(void * /* args ATS_UNUSED */)
       }
 
       if (header->version != LOG_SEGMENT_VERSION) {
-        Note("Invalid LogBuffer received; invalid version - buffer = %u, current = %u", header->version,
LOG_SEGMENT_VERSION);
+        Note("Invalid LogBuffer received; invalid version - buffer = %u, "
+             "current = %u",
+             header->version, LOG_SEGMENT_VERSION);
         delete[] header;
         continue;
       }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/Log.h
----------------------------------------------------------------------
diff --git a/proxy/logging/Log.h b/proxy/logging/Log.h
index fb194c9..8a26b8d 100644
--- a/proxy/logging/Log.h
+++ b/proxy/logging/Log.h
@@ -63,7 +63,8 @@
   o Initial State
 
       - A LogBufferPool is allocated, with storage equal to
-        sizeof (LogBufferPoolHeader) + buffer_segment_count * buffer_segment_size
+        sizeof (LogBufferPoolHeader) + buffer_segment_count *
+  buffer_segment_size
 
       - The buffer pool space is divided into buffer_segment_count
         segments, each with a fixed size of buffer_segment_size.
@@ -467,7 +468,6 @@ private:
   Log &operator=(const Log &rhs);
 };
 
-
 static inline bool
 LogRollingEnabledIsValid(int enabled)
 {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogAccess.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc
index bd2aacb..ecdf7c9 100644
--- a/proxy/logging/LogAccess.cc
+++ b/proxy/logging/LogAccess.cc
@@ -49,7 +49,6 @@
 #include "LogBuffer.h"
 #include "Log.h"
 
-
 /*-------------------------------------------------------------------------
   LogAccess::init
   -------------------------------------------------------------------------*/
@@ -401,7 +400,6 @@ LogAccess::marshal_proxy_host_ip(char *buf)
   return marshal_ip(buf, &Machine::instance()->ip.sa);
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -477,7 +475,6 @@ LogAccess::marshal_server_resp_time_s(char *buf)
   DEFAULT_INT_FIELD;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -565,7 +562,6 @@ LogAccess::marshal_http_header_field(LogField::Container /* container
ATS_UNUSED
   DEFAULT_STR_FIELD;
 }
 
-
 /*-------------------------------------------------------------------------
 
   -------------------------------------------------------------------------*/
@@ -769,11 +765,9 @@ LogAccess::marshal_record(char *record, char *buf)
   ink_assert(num_chars <= max_chars);
   memcpy(buf, out_buf, num_chars);
 
-
   return max_chars;
 }
 
-
 /*-------------------------------------------------------------------------
   LogAccess::marshal_str
 
@@ -1011,7 +1005,8 @@ LogAccess::unmarshal_int_to_str(char **buf, char *dest, int len)
 /*-------------------------------------------------------------------------
   LogAccess::unmarshal_int_to_str_hex
 
-  Return the string representation (hexadecimal) of the integer pointed at by buf.
+  Return the string representation (hexadecimal) of the integer pointed at by
+  buf.
   -------------------------------------------------------------------------*/
 
 int
@@ -1032,7 +1027,6 @@ LogAccess::unmarshal_int_to_str_hex(char **buf, char *dest, int len)
   return -1;
 }
 
-
 /*-------------------------------------------------------------------------
   LogAccess::unmarshal_str
 
@@ -1326,7 +1320,6 @@ LogAccess::unmarshal_finish_status(char **buf, char *dest, int len,
Ptr<LogField
   return (LogAccess::unmarshal_with_map(unmarshal_int(buf), dest, len, map, "UNKNOWN_FINISH_CODE"));
 }
 
-
 /*-------------------------------------------------------------------------
   LogAccess::unmarshal_cache_code
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogAccessHttp.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index a0a5689..7b90469 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -111,7 +111,8 @@ LogAccessHttp::init()
       //
       // here is the assert
       //
-      // assert (m_proxy_resp_content_type_str[0] >= 'A' && m_proxy_resp_content_type_str[0]
<= 'z');
+      // assert (m_proxy_resp_content_type_str[0] >= 'A' &&
+      // m_proxy_resp_content_type_str[0] <= 'z');
       LogUtils::remove_content_type_attributes(m_proxy_resp_content_type_str, &m_proxy_resp_content_type_len);
     } else {
       // If Content-Type field is missing, check for @Content-Type
@@ -136,7 +137,8 @@ LogAccessHttp::init()
 /*-------------------------------------------------------------------------
   The set routines ...
 
-  These routines are used by the WIPE_FIELD_VALUE filter to replace the original req url
+  These routines are used by the WIPE_FIELD_VALUE filter to replace the original
+  req url
   strings with the WIPED req strings.
   -------------------------------------------------------------------------*/
 
@@ -188,14 +190,14 @@ LogAccessHttp::set_client_req_unmapped_url_host(char *buf, int len)
 void
 LogAccessHttp::set_client_req_url_path(char *buf, int len)
 {
-  //?? use m_client_req_unmapped_url_path_str for now..may need to enhance later..
+  //?? use m_client_req_unmapped_url_path_str for now..may need to enhance
+  // later..
   if (buf) {
     m_client_req_url_path_len = len;
     ink_strlcpy(m_client_req_unmapped_url_path_str, buf, m_client_req_url_path_len + 1);
   }
 }
 
-
 /*-------------------------------------------------------------------------
   The marshalling routines ...
 
@@ -289,7 +291,6 @@ LogAccessHttp::marshal_client_auth_user_name(char *buf)
   return len;
 }
 
-
 /*-------------------------------------------------------------------------
   Private utility function to validate m_client_req_unmapped_url_canon_str &
   m_client_req_unmapped_url_canon_len fields.
@@ -349,7 +350,6 @@ LogAccessHttp::validate_unmapped_url_path(void)
   }
 }
 
-
 /*-------------------------------------------------------------------------
   Private utility function to validate m_cache_lookup_url_canon_str &
   m_cache_lookup__url_canon_len fields.
@@ -447,7 +447,6 @@ LogAccessHttp::marshal_client_req_url_canon(char *buf)
   return len;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -861,7 +860,6 @@ LogAccessHttp::marshal_server_host_ip(char *buf)
   return marshal_ip(buf, ip);
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -884,7 +882,6 @@ LogAccessHttp::marshal_server_host_name(char *buf)
   return padded_len;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -1041,7 +1038,6 @@ LogAccessHttp::marshal_cache_resp_http_version(char *buf)
   return (2 * INK_MIN_ALIGN);
 }
 
-
 int
 LogAccessHttp::marshal_client_retry_after_time(char *buf)
 {
@@ -1085,7 +1081,6 @@ convert_cache_write_code(HttpTransact::CacheWriteStatus_t t)
   return code;
 }
 
-
 int
 LogAccessHttp::marshal_cache_write_code(char *buf)
 {
@@ -1108,7 +1103,6 @@ LogAccessHttp::marshal_cache_write_transform_code(char *buf)
   return INK_MIN_ALIGN;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogAccessHttp.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessHttp.h b/proxy/logging/LogAccessHttp.h
index 93731b8..4093592 100644
--- a/proxy/logging/LogAccessHttp.h
+++ b/proxy/logging/LogAccessHttp.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_ACCESS_HTTP_H
 #define LOG_ACCESS_HTTP_H
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogAccessICP.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessICP.h b/proxy/logging/LogAccessICP.h
index 2fdd49a..7e293c3 100644
--- a/proxy/logging/LogAccessICP.h
+++ b/proxy/logging/LogAccessICP.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_ACCESS_ICP_H
 #define LOG_ACCESS_ICP_H
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogAccessTest.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccessTest.h b/proxy/logging/LogAccessTest.h
index c5a62ce..103597c 100644
--- a/proxy/logging/LogAccessTest.h
+++ b/proxy/logging/LogAccessTest.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_ACCESS_TEST_H
 #define LOG_ACCESS_TEST_H
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogBuffer.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.cc b/proxy/logging/LogBuffer.cc
index 6292498..737fc80 100644
--- a/proxy/logging/LogBuffer.cc
+++ b/proxy/logging/LogBuffer.cc
@@ -45,7 +45,6 @@
 #include "LogBuffer.h"
 #include "Log.h"
 
-
 struct FieldListCacheElement {
   LogFieldList *fieldlist;
   char *symbol_str;
@@ -342,7 +341,6 @@ LogBuffer::checkin_write(size_t write_offset)
   return ret_val;
 }
 
-
 unsigned
 LogBuffer::add_header_str(const char *str, char *buf_ptr, unsigned buf_len)
 {
@@ -356,7 +354,6 @@ LogBuffer::add_header_str(const char *str, char *buf_ptr, unsigned buf_len)
   return len;
 }
 
-
 size_t
 LogBuffer::_add_buffer_header()
 {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogBuffer.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h
index 160aac0..bcaac54 100644
--- a/proxy/logging/LogBuffer.h
+++ b/proxy/logging/LogBuffer.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_BUFFER_H
 #define LOG_BUFFER_H
 
@@ -95,7 +94,6 @@ struct LogBufferHeader {
   char *log_filename();
 };
 
-
 union LB_State {
   LB_State() : ival(0) {}
 
@@ -197,7 +195,8 @@ public:
   static void
   destroy(LogBuffer *lb)
   {
-    // ink_atomic_increment() returns the previous value, so when it was 1, we are
+    // ink_atomic_increment() returns the previous value, so when it was 1, we
+    // are
     // the thread that decremented to zero and should delete ...
     int refcnt = ink_atomic_increment(&lb->m_references, -1);
 
@@ -214,7 +213,8 @@ private:
   size_t m_size;                    // the buffer size
   size_t m_buf_align;               // the buffer alignment
   size_t m_write_align;             // the write alignment mask
-  int m_buffer_fast_allocator_size; // indicates whether the logbuffer is allocated from
ioBuf
+  int m_buffer_fast_allocator_size; // indicates whether the logbuffer is
+                                    // allocated from ioBuf
 
   long m_expiration_time; // buffer expiration time
 
@@ -293,7 +293,6 @@ private:
   LogBufferIterator &operator=(const LogBufferIterator &);
 };
 
-
 /*-------------------------------------------------------------------------
   LogBufferIterator
 
@@ -320,7 +319,6 @@ inline LogBufferIterator::LogBufferIterator(LogBufferHeader *header, bool
in_net
   }
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogCollationHostSM.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogCollationHostSM.cc b/proxy/logging/LogCollationHostSM.cc
index dc73d87..6f5c249 100644
--- a/proxy/logging/LogCollationHostSM.cc
+++ b/proxy/logging/LogCollationHostSM.cc
@@ -284,7 +284,8 @@ LogCollationHostSM::host_recv(int event, void * /* data ATS_UNUSED */)
       log_buffer_header = (LogBufferHeader *)m_read_buffer;
 
       // convert the buffer we just received to host order
-      // TODO: We currently don't try to make the log buffers handle little vs big endian.
TS-1156.
+      // TODO: We currently don't try to make the log buffers handle little vs
+      // big endian. TS-1156.
       // LogBuffer::convert_to_host_order(log_buffer_header);
 
       version = log_buffer_header->version;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogConfig.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogConfig.h b/proxy/logging/LogConfig.h
index 6143d91..23e7d57 100644
--- a/proxy/logging/LogConfig.h
+++ b/proxy/logging/LogConfig.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_CONFIG_H
 #define LOG_CONFIG_H
 
@@ -39,7 +38,6 @@ enum {
   log_stat_event_log_error_aggr_stat,
   log_stat_event_log_error_full_stat,
   log_stat_event_log_error_fail_stat,
-
   log_stat_event_log_access_ok_stat,
   log_stat_event_log_access_skip_stat,
   log_stat_event_log_access_aggr_stat,
@@ -52,12 +50,10 @@ enum {
   log_stat_num_received_from_network_stat,
   log_stat_num_flush_to_disk_stat,
   log_stat_num_lost_before_flush_to_disk_stat,
-
   log_stat_bytes_lost_before_preproc_stat,
   log_stat_bytes_sent_to_network_stat,
   log_stat_bytes_lost_before_sent_to_network_stat,
   log_stat_bytes_received_from_network_stat,
-
   log_stat_bytes_flush_to_disk_stat,
   log_stat_bytes_lost_before_flush_to_disk_stat,
   log_stat_bytes_written_to_disk_stat,
@@ -66,7 +62,6 @@ enum {
   // Logging I/O
   log_stat_log_files_open_stat,
   log_stat_log_files_space_used_stat,
-
   log_stat_count
 };
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogField.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogField.cc b/proxy/logging/LogField.cc
index 64d01b0..81ef288 100644
--- a/proxy/logging/LogField.cc
+++ b/proxy/logging/LogField.cc
@@ -405,7 +405,6 @@ LogField::set_aggregate_op(LogField::Aggregate agg_op)
   }
 }
 
-
 void
 LogField::update_aggregate(int64_t val)
 {
@@ -439,7 +438,6 @@ LogField::update_aggregate(int64_t val)
         m_symbol, val, m_agg_val, m_agg_cnt);
 }
 
-
 LogField::Container
 LogField::valid_container_name(char *name)
 {
@@ -451,7 +449,6 @@ LogField::valid_container_name(char *name)
   return LogField::NO_CONTAINER;
 }
 
-
 LogField::Aggregate
 LogField::valid_aggregate_name(char *name)
 {
@@ -463,7 +460,6 @@ LogField::valid_aggregate_name(char *name)
   return LogField::NO_AGGREGATE;
 }
 
-
 bool
 LogField::fieldlist_contains_aggregates(char *fieldlist)
 {
@@ -476,7 +472,6 @@ LogField::fieldlist_contains_aggregates(char *fieldlist)
   return contains_aggregates;
 }
 
-
 /*-------------------------------------------------------------------------
   LogFieldList
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogField.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogField.h b/proxy/logging/LogField.h
index 09562da..36dc081 100644
--- a/proxy/logging/LogField.h
+++ b/proxy/logging/LogField.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_FIELD_H
 #define LOG_FIELD_H
 
@@ -58,7 +57,6 @@ struct LogSlice {
   int toStrOffset(int strlen, int *offset);
 };
 
-
 /*-------------------------------------------------------------------------
   LogField
 
@@ -79,7 +77,6 @@ public:
   typedef int (*UnmarshalFuncWithMap)(char **buf, char *dest, int len, Ptr<LogFieldAliasMap>
map);
   typedef void (LogAccess::*SetFunc)(char *buf, int len);
 
-
   enum Type {
     sINT = 0,
     dINT,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFieldAliasMap.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFieldAliasMap.h b/proxy/logging/LogFieldAliasMap.h
index e355232..9edadd7 100644
--- a/proxy/logging/LogFieldAliasMap.h
+++ b/proxy/logging/LogFieldAliasMap.h
@@ -22,11 +22,11 @@
 
   @section description
   This file implements an abstract class to map between numbers of type IntType
-  and strings. The purpose is to obtain one representation from the other so that
+  and strings. The purpose is to obtain one representation from the other so
+  that
   easily remembered names can be used to refer to log fields of integer type.
  */
 
-
 #ifndef LOG_FIELD_ALIAS_MAP_H
 #define LOG_FIELD_ALIAS_MAP_H
 
@@ -71,7 +71,6 @@ any memory the map may have allocated.
 
  *****************************************************************************/
 
-
 class LogFieldAliasMap : public RefCountObj
 {
 public:
@@ -212,6 +211,5 @@ public:
   }
 };
 
-
 // LOG_FIELD_ALIAS_MAP_H
 #endif

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFile.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.cc b/proxy/logging/LogFile.cc
index 5e44093..708b213 100644
--- a/proxy/logging/LogFile.cc
+++ b/proxy/logging/LogFile.cc
@@ -734,7 +734,8 @@ LogFile::check_fd()
   stat_check_count++;
 
   int err = open_file();
-  // XXX if open_file() returns, LOG_FILE_FILESYSTEM_CHECKS_FAILED, raise a more informative
alarm ...
+  // XXX if open_file() returns, LOG_FILE_FILESYSTEM_CHECKS_FAILED, raise a more
+  // informative alarm ...
   if (err != LOG_FILE_NO_ERROR && err != LOG_FILE_NO_PIPE_READERS) {
     if (!failure_last_call) {
       LogUtils::manager_alarm(LogUtils::LOG_ALARM_ERROR, "Traffic Server could not open logfile
%s.", m_name);
@@ -757,7 +758,6 @@ LogFile::display(FILE *fd)
  LogFileList IS NOT USED
 ****************************************************************************/
 
-
 /****************************************************************************
 
   MetaInfo methods

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFile.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFile.h b/proxy/logging/LogFile.h
index 2e345a5..a8febf0 100644
--- a/proxy/logging/LogFile.h
+++ b/proxy/logging/LogFile.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_FILE_H
 #define LOG_FILE_H
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFilter.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFilter.cc b/proxy/logging/LogFilter.cc
index abdf66f..fb0d53c 100644
--- a/proxy/logging/LogFilter.cc
+++ b/proxy/logging/LogFilter.cc
@@ -68,7 +68,6 @@ LogFilter::~LogFilter()
   delete m_field;
 }
 
-
 /*-------------------------------------------------------------------------
   LogFilterString::LogFilterString
   -------------------------------------------------------------------------*/
@@ -95,7 +94,6 @@ LogFilterString::_setValues(size_t n, char **value)
   }
 }
 
-
 LogFilterString::LogFilterString(const char *name, LogField *field, LogFilter::Action action,
LogFilter::Operator oper,
                                  char *values)
   : LogFilter(name, field, action, oper)
@@ -246,7 +244,6 @@ LogFilterString::wipe_this_entry(LogAccess *lad)
   return cond_satisfied;
 }
 
-
 /*-------------------------------------------------------------------------
   LogFilterString::toss_this_entry
 
@@ -655,7 +652,9 @@ LogFilterIP::LogFilterIP(const char *name, LogField *field, LogFilter::Action
ac
       if (0 == min.load(t)) {
         if (x) {
           if (0 != max.load(x)) {
-            Warning("LogFilterIP Configuration: '%s-%s' looks like a range but the second
address was ill formed", t, x);
+            Warning("LogFilterIP Configuration: '%s-%s' looks like a range but "
+                    "the second address was ill formed",
+                    t, x);
             continue;
           }
         } else {
@@ -744,8 +743,10 @@ LogFilterIP::is_match(LogAccess *lad)
   if (m_field && lad) {
     LogFieldIpStorage value;
     m_field->marshal(lad, reinterpret_cast<char *>(&value));
-    // This is bad, we abuse the fact that the initial layout of LogFieldIpStorage and IpAddr
-    // are identical. We should look at converting the log stuff to use IpAddr directly.
+    // This is bad, we abuse the fact that the initial layout of
+    // LogFieldIpStorage and IpAddr
+    // are identical. We should look at converting the log stuff to use IpAddr
+    // directly.
     zret = m_map.contains(reinterpret_cast<IpAddr &>(value));
   }
 
@@ -817,7 +818,6 @@ LogFilterIP::display(FILE *fd)
   }
 }
 
-
 void
 LogFilterIP::display_as_XML(FILE *fd)
 {
@@ -957,7 +957,6 @@ LogFilterList::wipe_this_entry(LogAccess *lad)
   return wipeFlag;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 
@@ -999,7 +998,6 @@ LogFilterList::find_by_name(char *name)
   return NULL;
 }
 
-
 /*-------------------------------------------------------------------------
   -------------------------------------------------------------------------*/
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFilter.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFilter.h b/proxy/logging/LogFilter.h
index 8a82a68..b3be370 100644
--- a/proxy/logging/LogFilter.h
+++ b/proxy/logging/LogFilter.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_FILTER_H
 #define LOG_FILTER_H
 
@@ -247,7 +246,6 @@ private:
 
 bool filters_are_equal(LogFilter *filt1, LogFilter *filt2);
 
-
 /*-------------------------------------------------------------------------
   LogFilterList
   -------------------------------------------------------------------------*/
@@ -306,7 +304,6 @@ private:
   LogFilterList &operator=(const LogFilterList &rhs);
 };
 
-
 /*-------------------------------------------------------------------------
   Inline functions
   -------------------------------------------------------------------------*/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFormat.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFormat.cc b/proxy/logging/LogFormat.cc
index 069211c..4c4723d 100644
--- a/proxy/logging/LogFormat.cc
+++ b/proxy/logging/LogFormat.cc
@@ -95,7 +95,8 @@ LogFormat::setup(const char *name, const char *format_str, unsigned interval_sec
     return true;
   }
 
-  // We don't have a format string (ie. this will be a raw text log, so we are always valid.
+  // We don't have a format string (ie. this will be a raw text log, so we are
+  // always valid.
   m_valid = true;
   return true;
 }
@@ -188,8 +189,10 @@ LogFormat::LogFormat(const char *name, const char *format_str, unsigned
interval
 {
   setup(name, format_str, interval_sec);
 
-  // A LOG_FORMAT_TEXT is a log without a format string, everything else is a LOG_FORMAT_CUSTOM.
It's possible that we could get
-  // rid of log types altogether, but LogFile currently tests whether a format is a LOG_FORMAT_TEXT
format ...
+  // A LOG_FORMAT_TEXT is a log without a format string, everything else is a
+  // LOG_FORMAT_CUSTOM. It's possible that we could get
+  // rid of log types altogether, but LogFile currently tests whether a format
+  // is a LOG_FORMAT_TEXT format ...
   m_format_type = format_str ? LOG_FORMAT_CUSTOM : LOG_FORMAT_TEXT;
 }
 
@@ -574,7 +577,9 @@ LogFormat::parse_escape_string(const char *str, int len)
     sum = (a - '0') * 64 + (b - '0') * 8 + (c - '0');
 
     if (sum == 0 || sum >= 255) {
-      Warning("Octal escape sequence out of range: \\%c%c%c, treat it as normal string\n",
a, b, c);
+      Warning("Octal escape sequence out of range: \\%c%c%c, treat it as "
+              "normal string\n",
+              a, b, c);
       return -1;
     } else
       return sum;
@@ -594,7 +599,9 @@ LogFormat::parse_escape_string(const char *str, int len)
     sum = i * 16 + j;
 
     if (sum == 0 || sum >= 255) {
-      Warning("Hex escape sequence out of range: \\%c%c%c, treat it as normal string\n",
a, b, c);
+      Warning("Hex escape sequence out of range: \\%c%c%c, treat it as normal "
+              "string\n",
+              a, b, c);
       return -1;
     } else
       return sum;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogFormat.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogFormat.h b/proxy/logging/LogFormat.h
index 39ee864..4c822eb 100644
--- a/proxy/logging/LogFormat.h
+++ b/proxy/logging/LogFormat.h
@@ -31,7 +31,8 @@
 #include "InkXml.h"
 
 enum LogFormatType {
-  // We start the numbering at 4 to compatibility with Traffic Server 4.x, which used
+  // We start the numbering at 4 to compatibility with Traffic Server 4.x, which
+  // used
   // to have the predefined log formats enumerated above ...
   LOG_FORMAT_CUSTOM = 4,
   LOG_FORMAT_TEXT = 5

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index be65070..402def8 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -28,7 +28,6 @@
  ***************************************************************************/
 #include "libts.h"
 
-
 #include "Error.h"
 #include "P_EventSystem.h"
 #include "LogUtils.h"
@@ -248,7 +247,6 @@ LogObject::generate_filenames(const char *log_dir, const char *basename,
LogFile
   m_basename[basename_len - 1] = 0;
 }
 
-
 void
 LogObject::rename(char *new_name)
 {
@@ -261,7 +259,6 @@ LogObject::rename(char *new_name)
   m_logFile->change_name(new_name);
 }
 
-
 void
 LogObject::add_filter(LogFilter *filter, bool copy)
 {
@@ -271,7 +268,6 @@ LogObject::add_filter(LogFilter *filter, bool copy)
   m_filter_list.add(filter, copy);
 }
 
-
 void
 LogObject::set_filter_list(const LogFilterList &list, bool copy)
 {
@@ -284,7 +280,6 @@ LogObject::set_filter_list(const LogFilterList &list, bool copy)
   m_filter_list.set_conjunction(list.does_conjunction());
 }
 
-
 void
 LogObject::add_loghost(LogHost *host, bool copy)
 {
@@ -300,7 +295,6 @@ LogObject::add_loghost(LogHost *host, bool copy)
   m_logFile.clear();
 }
 
-
 // we conpute the object signature from the fieldlist_str and the printf_str
 // of the LogFormat rather than from the format_str because the format_str
 // is not part of a LogBuffer header
@@ -328,7 +322,6 @@ LogObject::compute_signature(LogFormat *format, char *filename, unsigned
int fla
   return signature;
 }
 
-
 void
 LogObject::display(FILE *fd)
 {
@@ -346,7 +339,6 @@ LogObject::display(FILE *fd)
   fprintf(fd, "++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
 }
 
-
 void
 LogObject::displayAsXML(FILE *fd, bool extended)
 {
@@ -375,7 +367,6 @@ LogObject::displayAsXML(FILE *fd, bool extended)
   fprintf(fd, "</LogObject>\n");
 }
 
-
 LogBuffer *
 LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
 {
@@ -496,7 +487,6 @@ LogObject::_checkout_write(size_t *write_offset, size_t bytes_needed)
   return buffer;
 }
 
-
 int
 LogObject::va_log(LogAccess *lad, const char *fmt, va_list ap)
 {
@@ -636,7 +626,6 @@ LogObject::log(LogAccess *lad, const char *text_entry)
   return Log::LOG_OK;
 }
 
-
 void
 LogObject::_setup_rolling(Log::RollingEnabledValues rolling_enabled, int rolling_interval_sec,
int rolling_offset_hr,
                           int rolling_size_mb)
@@ -702,7 +691,6 @@ LogObject::_setup_rolling(Log::RollingEnabledValues rolling_enabled, int
rolling
   }
 }
 
-
 unsigned
 LogObject::roll_files(long time_now)
 {
@@ -762,7 +750,6 @@ LogObject::roll_files(long time_now)
   return num_rolled;
 }
 
-
 unsigned
 LogObject::_roll_files(long last_roll_time, long time_now)
 {
@@ -786,7 +773,6 @@ LogObject::_roll_files(long last_roll_time, long time_now)
   return num_rolled;
 }
 
-
 void
 LogObject::check_buffer_expiration(long time_now)
 {
@@ -796,7 +782,6 @@ LogObject::check_buffer_expiration(long time_now)
   }
 }
 
-
 // make sure that we will be able to write the logs to the disk
 //
 int
@@ -809,7 +794,6 @@ LogObject::do_filesystem_checks()
   }
 }
 
-
 /*-------------------------------------------------------------------------
   TextLogObject::TextLogObject
   -------------------------------------------------------------------------*/
@@ -826,7 +810,6 @@ TextLogObject::TextLogObject(const char *name, const char *log_dir, bool
timesta
   }
 }
 
-
 /*-------------------------------------------------------------------------
   TextLogObject::write
 
@@ -850,7 +833,6 @@ TextLogObject::write(const char *format, ...)
   return ret_val;
 }
 
-
 /*-------------------------------------------------------------------------
   TextLogObject::va_write
 
@@ -866,7 +848,6 @@ TextLogObject::va_write(const char *format, va_list ap)
   return this->va_log(NULL, format, ap);
 }
 
-
 /*-------------------------------------------------------------------------
   LogObjectManager
   -------------------------------------------------------------------------*/
@@ -954,7 +935,6 @@ LogObjectManager::_manage_object(LogObject *log_object, bool is_api_object,
int
   return retVal;
 }
 
-
 int
 LogObjectManager::_solve_filename_conflicts(LogObject *log_object, int maxConflicts)
 {
@@ -1060,7 +1040,6 @@ LogObjectManager::_solve_filename_conflicts(LogObject *log_object, int
maxConfli
   return retVal;
 }
 
-
 bool
 LogObjectManager::_has_internal_filename_conflict(const char *filename, LogObjectList &objects)
 {
@@ -1078,7 +1057,6 @@ LogObjectManager::_has_internal_filename_conflict(const char *filename,
LogObjec
   return false;
 }
 
-
 int
 LogObjectManager::_solve_internal_filename_conflicts(LogObject *log_object, int maxConflicts,
int fileNum)
 {
@@ -1103,7 +1081,6 @@ LogObjectManager::_solve_internal_filename_conflicts(LogObject *log_object,
int
   return retVal;
 }
 
-
 LogObject *
 LogObjectManager::get_object_with_signature(uint64_t signature)
 {
@@ -1117,7 +1094,6 @@ LogObjectManager::get_object_with_signature(uint64_t signature)
   return NULL;
 }
 
-
 void
 LogObjectManager::check_buffer_expiration(long time_now)
 {
@@ -1154,7 +1130,6 @@ LogObjectManager::preproc_buffers(int idx)
   return buffers_preproced;
 }
 
-
 bool
 LogObjectManager::unmanage_api_object(LogObject *logObject)
 {
@@ -1163,7 +1138,8 @@ LogObjectManager::unmanage_api_object(LogObject *logObject)
   if (this->_APIobjects.in(logObject)) {
     this->_APIobjects.remove(logObject);
 
-    // Force a buffer flush, then schedule this LogObject to be deleted on the eventProcessor.
+    // Force a buffer flush, then schedule this LogObject to be deleted on the
+    // eventProcessor.
     logObject->force_new_buffer();
     new_Derefer(logObject, HRTIME_SECONDS(60));
 
@@ -1175,7 +1151,6 @@ LogObjectManager::unmanage_api_object(LogObject *logObject)
   return false;
 }
 
-
 void
 LogObjectManager::add_filter_to_all(LogFilter *filter)
 {
@@ -1184,7 +1159,6 @@ LogObjectManager::add_filter_to_all(LogFilter *filter)
   }
 }
 
-
 void
 LogObjectManager::open_local_pipes()
 {
@@ -1199,7 +1173,6 @@ LogObjectManager::open_local_pipes()
   }
 }
 
-
 void
 LogObjectManager::transfer_objects(LogObjectManager &old_mgr)
 {
@@ -1219,7 +1192,8 @@ LogObjectManager::transfer_objects(LogObjectManager &old_mgr)
     }
   }
 
-  // Transfer the API objects from the old manager. The old manager will retain its refcount.
+  // Transfer the API objects from the old manager. The old manager will retain
+  // its refcount.
   for (unsigned i = 0; i < old_mgr._APIobjects.length(); ++i) {
     manage_api_object(old_mgr._APIobjects[i]);
   }
@@ -1230,8 +1204,10 @@ LogObjectManager::transfer_objects(LogObjectManager &old_mgr)
 
     Debug("log-config-transfer", "examining existing object %s", old_obj->get_base_filename());
 
-    // See if any of the new objects is just a copy of an old one. If so, transfer the
-    // old one to the new manager and delete the new one. We don't use Vec::in here because
+    // See if any of the new objects is just a copy of an old one. If so,
+    // transfer the
+    // old one to the new manager and delete the new one. We don't use Vec::in
+    // here because
     // we need to compare the object hash, not the pointers.
     for (unsigned j = 0; j < _objects.length(); j++) {
       new_obj = _objects[j];
@@ -1394,8 +1370,10 @@ REGRESSION_TEST(LogObjectManager_Transfer)(RegressionTest *t, int /*
atype ATS_U
 {
   TestBox box(t, pstatus);
 
-  // There used to be a lot of confusion around whether LogObjects were owned by ome or more
LogObjectManager
-  // objects, or handed off to static storage in the Log class. This test just verifies that
this is no longer
+  // There used to be a lot of confusion around whether LogObjects were owned by
+  // ome or more LogObjectManager
+  // objects, or handed off to static storage in the Log class. This test just
+  // verifies that this is no longer
   // the case.
   {
     LogObjectManager mgr1;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogObject.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.h b/proxy/logging/LogObject.h
index 649ad4f..f9f9892 100644
--- a/proxy/logging/LogObject.h
+++ b/proxy/logging/LogObject.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_OBJECT_H
 #define LOG_OBJECT_H
 
@@ -83,7 +82,8 @@ public:
   size_t preproc_buffers(LogBufferSink *sink);
 };
 
-// LogObject is atomically reference counted, and the reference count is always owned by
+// LogObject is atomically reference counted, and the reference count is always
+// owned by
 // one or more LogObjectManagers.
 class LogObject : public RefCountObj
 {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogSock.h
----------------------------------------------------------------------
diff --git a/proxy/logging/LogSock.h b/proxy/logging/LogSock.h
index a80cf2b..40bcd3a 100644
--- a/proxy/logging/LogSock.h
+++ b/proxy/logging/LogSock.h
@@ -21,7 +21,6 @@
   limitations under the License.
  */
 
-
 #ifndef LOG_SOCK_H
 #define LOG_SOCK_H
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogStandalone.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogStandalone.cc b/proxy/logging/LogStandalone.cc
index ebac47c..b530b32 100644
--- a/proxy/logging/LogStandalone.cc
+++ b/proxy/logging/LogStandalone.cc
@@ -61,7 +61,6 @@ char error_tags[1024] = "";
 char action_tags[1024] = "";
 char command_string[512] = "";
 
-
 // Diags *diags = NULL;
 DiagsConfig *diagsConfig = NULL;
 HttpBodyFactory *body_factory = NULL;
@@ -138,7 +137,6 @@ initialize_process_manager()
   //                         RECP_NON_PERSISTENT);
 }
 
-
 /*-------------------------------------------------------------------------
   check_lockfile
   -------------------------------------------------------------------------*/

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logging/LogUtils.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogUtils.cc b/proxy/logging/LogUtils.cc
index 4099f54..77af53d 100644
--- a/proxy/logging/LogUtils.cc
+++ b/proxy/logging/LogUtils.cc
@@ -46,7 +46,6 @@
 #include "LogUtils.h"
 #include "LogLimits.h"
 
-
 /*-------------------------------------------------------------------------
   LogUtils::timestamp_to_str
 
@@ -394,11 +393,11 @@ LogUtils::remove_content_type_attributes(char *type_str, int *type_len)
   }
 }
 
-
 /*-------------------------------------------------------------------------
   LogUtils::timestamp_to_hex_str
 
-  This routine simply writes the given timestamp integer [time_t] in the equivalent
+  This routine simply writes the given timestamp integer [time_t] in the
+  equivalent
   hexadecimal string format "xxxxxxxxxx" into the provided buffer [buf] of
   size [bufLen].
 
@@ -457,7 +456,6 @@ LogUtils::seconds_to_next_roll(time_t time_now, int rolling_offset, int
rolling_
   return ((tr >= sidl ? (tr - sidl) % rolling_interval : (86400 - (sidl - tr)) % rolling_interval));
 }
 
-
 // Checks if the file pointed to by full_filename either is a regular
 // file or a pipe and has write permission, or, if the file does not
 // exist, if the path prefix of full_filename names a directory that

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/528eab64/proxy/logstats.cc
----------------------------------------------------------------------
diff --git a/proxy/logstats.cc b/proxy/logstats.cc
index 7c24eb3..e0b64af 100644
--- a/proxy/logstats.cc
+++ b/proxy/logstats.cc
@@ -69,7 +69,6 @@ const int DEFAULT_LINE_LEN = 78;
 const double LOG10_1024 = 3.0102999566398116;
 const int MAX_ORIG_STRING = 4096;
 
-
 // Optimizations for "strcmp()", treat some fixed length (3 or 4 bytes) strings
 // as integers.
 const int GET_AS_INT = 5522759;
@@ -103,7 +102,6 @@ struct LastState {
 };
 static LastState last_state;
 
-
 // Store the collected counters and stats, per Origin Server, URL or total
 struct StatsCounter {
   int64_t count;
@@ -446,7 +444,8 @@ public:
         }
         ats_free(const_cast<char *>(l->url)); // We no longer own this string.
       } else {
-        l = _stack.insert(l, UrlStats()); // This seems faster than having a static "template"
...
+        l = _stack.insert(l, UrlStats()); // This seems faster than having a
+                                          // static "template" ...
       }
 
       // Setup this URL stat
@@ -554,7 +553,6 @@ private:
   LruStack::iterator _cur;
 };
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Globals, holding the accumulated stats (ok, I'm lazy ...)
 static OriginStats totals;
@@ -671,7 +669,6 @@ CommandLineArgs::parse_arguments(const char **argv)
   }
 }
 
-
 // Enum for return code levels.
 enum ExitLevel {
   EXIT_OK = 0,
@@ -708,7 +705,6 @@ struct ExitStatus {
   }
 };
 
-
 // Enum for parsing a log line
 enum ParseStates {
   P_STATE_ELAPSED,
@@ -748,7 +744,6 @@ enum URLScheme {
   SCHEME_OTHER,
 };
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Initialize the elapsed field
 inline void
@@ -903,7 +898,6 @@ update_results_elapsed(OriginStats *stat, int result, int elapsed, int
size)
   }
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Update the "codes" stats for a particular record
 inline void
@@ -1051,7 +1045,6 @@ update_codes(OriginStats *stat, int code, int size)
     update_counter(stat->codes.c_2xx, size);
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Update the "methods" stats for a particular record
 inline void
@@ -1105,7 +1098,6 @@ update_methods(OriginStats *stat, int method, int size)
   }
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Update the "schemes" stats for a particular record
 inline void
@@ -1121,7 +1113,6 @@ update_schemes(OriginStats *stat, int scheme, int size)
     update_counter(stat->schemes.other, size);
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Parse a log buffer
 int
@@ -1296,7 +1287,8 @@ parse_log_buff(LogBufferHeader *buf_header, bool summary = false)
           if (ptr && !summary) { // Find the origin
             *ptr = '\0';
 
-            // TODO: If we save state (struct) for a run, we probably need to always
+            // TODO: If we save state (struct) for a run, we probably need to
+            // always
             // update the origin data, no matter what the origin_set is.
             if (origin_set->empty() || (origin_set->find(tok) != origin_set->end()))
{
               o_iter = origins.find(tok);
@@ -1591,7 +1583,6 @@ parse_log_buff(LogBufferHeader *buf_header, bool summary = false)
   return 0;
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Process a file (FD)
 int
@@ -1655,8 +1646,9 @@ process_file(int in_fd, off_t offset, unsigned max_age)
     unsigned second_read_size = sizeof(LogBufferHeader) - first_read_size;
     nread = read(in_fd, &buffer[first_read_size], second_read_size);
     if (!nread || EOF == nread) {
-      Debug("logstats", "Second read of header failed (attemped %d bytes at offset %d, got
nothing), errno=%d.", second_read_size,
-            first_read_size, errno);
+      Debug("logstats", "Second read of header failed (attemped %d bytes at "
+                        "offset %d, got nothing), errno=%d.",
+            second_read_size, first_read_size, errno);
       return 1;
     }
 
@@ -1674,12 +1666,15 @@ process_file(int in_fd, off_t offset, unsigned max_age)
 
     const int MAX_READ_TRIES = 5;
     int total_read = 0;
-    int read_tries_remaining = MAX_READ_TRIES; // since the data will be old anyway, let's
only try a few times.
+    int read_tries_remaining = MAX_READ_TRIES; // since the data will be old
+                                               // anyway, let's only try a few
+                                               // times.
     do {
       nread = read(in_fd, &buffer[sizeof(LogBufferHeader) + total_read], buffer_bytes
- total_read);
       if (EOF == nread || !nread) { // just bail on error
-        Debug("logstats", "Read failed while reading log buffer, wanted %d bytes, nread=%d,
errno=%d", buffer_bytes - total_read,
-              nread, errno);
+        Debug("logstats", "Read failed while reading log buffer, wanted %d "
+                          "bytes, nread=%d, errno=%d",
+              buffer_bytes - total_read, nread, errno);
         return 1;
       } else {
         total_read += nread;
@@ -1692,8 +1687,9 @@ process_file(int in_fd, off_t offset, unsigned max_age)
           return 1;
         }
         // let's wait until we get more data on this file descriptor
-        Debug("logstats_partial_read",
-              "Failed to read buffer payload [%d bytes], total_read=%d, buffer_bytes=%d,
tries_remaining=%d",
+        Debug("logstats_partial_read", "Failed to read buffer payload [%d "
+                                       "bytes], total_read=%d, "
+                                       "buffer_bytes=%d, tries_remaining=%d",
               buffer_bytes - total_read, total_read, buffer_bytes, read_tries_remaining);
         usleep(50 * 1000); // wait 50ms
       }
@@ -1713,7 +1709,6 @@ process_file(int in_fd, off_t offset, unsigned max_age)
   return 0;
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Determine if this "stat" (Origin Server) is worthwhile to produce a
 // report for.
@@ -1723,7 +1718,6 @@ use_origin(const OriginStats *stat)
   return ((stat->total.count > cl.min_hits) && (NULL != strchr(stat->server,
'.')) && (NULL == strchr(stat->server, '%')));
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Produce a nicely formatted output for a stats collection on a stream
 inline void
@@ -1786,7 +1780,6 @@ format_elapsed_line(const char *desc, const ElapsedStats &stat,
bool json = fals
   }
 }
 
-
 void
 format_detail_header(const char *desc)
 {
@@ -1829,7 +1822,6 @@ format_line(const char *desc, const StatsCounter &stat, const StatsCounter
&tota
   }
 }
 
-
 // Little "helpers" for the vector we use to sort the Origins.
 typedef pair<const char *, OriginStats *> OriginPair;
 inline bool operator<(const OriginPair &a, const OriginPair &b)
@@ -2068,7 +2060,6 @@ print_detail_stats(const OriginStats *stat, bool json = false)
   }
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // Little wrapper around exit, to allow us to exit gracefully
 void
@@ -2140,7 +2131,8 @@ my_exit(const ExitStatus &status)
     }
   }
 
-  // Next the totals for all Origins, unless we specified a list of origins to filter.
+  // Next the totals for all Origins, unless we specified a list of origins to
+  // filter.
   if (origin_set->empty()) {
     first = false;
     if (cl.json) {
@@ -2213,7 +2205,6 @@ open_main_log(ExitStatus &status)
   return main_fd;
 }
 
-
 ///////////////////////////////////////////////////////////////////////////////
 // main
 int


Mime
View raw message