You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2010/11/30 02:43:06 UTC

svn commit: r1040383 [18/38] - in /trafficserver/traffic/branches/wccp: ./ build/ contrib/ contrib/perl/AdminClient/lib/Apache/TS/ example/ example/add-header/ example/app-template/ example/append-transform/ example/basic-auth/ example/blacklist-0/ exa...

Modified: trafficserver/traffic/branches/wccp/proxy/logging/Log.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/Log.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/Log.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/Log.cc Tue Nov 30 01:42:55 2010
@@ -61,6 +61,7 @@
 
 #define FLUSH_THREAD_SLEEP_TIMEOUT (1)
 #define FLUSH_THREAD_MIN_FLUSH_COUNTER (FLUSH_ARRAY_SIZE/4)
+#define PERIODIC_TASKS_INTERVAL 5 // TODO: Maybe this should be done as a config option
 
 // Log global objects
 inkcoreapi TextLogObject *Log::error_log = NULL;
@@ -110,7 +111,7 @@ RecRawStatBlock *log_rsb;
 void
 Log::change_configuration()
 {
-  Debug("log2-config", "Changing configuration ...");
+  Debug("log-config", "Changing configuration ...");
 
   LogConfig *new_config = NEW(new LogConfig);
   ink_assert(new_config != NULL);
@@ -120,7 +121,7 @@ Log::change_configuration()
   // the new config
   //
   ink_mutex_acquire(Log::config->log_object_manager._APImutex);
-  Debug("log2-api-mutex", "Log::change_configuration acquired api mutex");
+  Debug("log-api-mutex", "Log::change_configuration acquired api mutex");
 
   new_config->init(Log::config);
 
@@ -135,9 +136,9 @@ Log::change_configuration()
   }
 
   ink_mutex_release(Log::config->log_object_manager._APImutex);
-  Debug("log2-api-mutex", "Log::change_configuration released api mutex");
+  Debug("log-api-mutex", "Log::change_configuration released api mutex");
 
-  Debug("log2-config", "... new configuration in place");
+  Debug("log-config", "... new configuration in place");
 }
 
 void
@@ -183,7 +184,7 @@ Log::add_to_inactive(LogObject * object)
   Log::periodic_tasks
 
   This function contains all of the tasks that need to be done each
-  second.
+  PERIODIC_TASKS_INTERVAL seconds.
   -------------------------------------------------------------------------*/
 
 void
@@ -196,28 +197,28 @@ Log::periodic_tasks(long time_now)
   // it to be zero; we will get a chance to delete it next time
   //
 
-  Debug("log2-api-mutex", "entering Log::periodic_tasks");
+  Debug("log-api-mutex", "entering Log::periodic_tasks");
   if (numInactiveObjects) {
     ink_mutex_acquire(Log::config->log_object_manager._APImutex);
-    Debug("log2-api-mutex", "Log::periodic_tasks acquired api mutex");
-    Debug("log2-periodic", "Deleting inactive_objects");
+    Debug("log-api-mutex", "Log::periodic_tasks acquired api mutex");
+    Debug("log-periodic", "Deleting inactive_objects");
     for (size_t i = 0; i < numInactiveObjects; i++) {
       delete inactive_objects[i];
     }
     numInactiveObjects = 0;
     ink_mutex_release(Log::config->log_object_manager._APImutex);
-    Debug("log2-api-mutex", "Log::periodic_tasks released api mutex");
+    Debug("log-api-mutex", "Log::periodic_tasks released api mutex");
   }
 
   if (logging_mode_changed || Log::config->reconfiguration_needed) {
-
-    Debug("log2-config", "Performing reconfiguration, init status = %d", init_status);
+    Debug("log-config", "Performing reconfiguration, init status = %d", init_status);
 
     if (logging_mode_changed) {
-      int val = (int) LOG_ConfigReadInteger("proxy.config.log2.logging_enabled");
+      int val = (int) LOG_ConfigReadInteger("proxy.config.log.logging_enabled");
+
       if (val<LOG_NOTHING || val> FULL_LOGGING) {
         logging_mode = FULL_LOGGING;
-        Warning("proxy.config.log2.logging_enabled has an invalid " "value setting it to %d", logging_mode);
+        Warning("proxy.config.log.logging_enabled has an invalid " "value setting it to %d", logging_mode);
       } else {
         logging_mode = (LoggingMode) val;
       }
@@ -227,11 +228,9 @@ Log::periodic_tasks(long time_now)
     // so that log objects are flushed
     //
     change_configuration();
-
-  } else if (logging_mode > LOG_NOTHING ||
-             config->collation_mode == LogConfig::COLLATION_HOST || config->has_api_objects()) {
-
-    Debug("log2-periodic", "Performing periodic tasks");
+  } else if (logging_mode > LOG_NOTHING || config->collation_mode == LogConfig::COLLATION_HOST ||
+             config->has_api_objects()) {
+    Debug("log-periodic", "Performing periodic tasks");
 
     // Check if space is ok and update the space used
     //
@@ -248,6 +247,7 @@ Log::periodic_tasks(long time_now)
     // give objects a chance to roll if they need to
     //
     int num_rolled = 0;
+
     if (Log::config->roll_log_files_now) {
       if (error_log) {
         num_rolled += error_log->roll_files(time_now);
@@ -334,9 +334,9 @@ Log::init_fields()
 
   Ptr<LogFieldAliasIP> ip_map = NEW(new LogFieldAliasIP);
   field = NEW(new LogField("client_host_ip", "chi",
-                           LogField::sINT,
+                           LogField::STRING,
                            &LogAccess::marshal_client_host_ip,
-                           &LogAccess::unmarshal_ip, (Ptr<LogFieldAliasMap>) ip_map));
+                           &LogAccess::unmarshal_str));
   global_field_list.add(field, false);
   ink_hash_table_insert(field_symbol_hash, "chi", field);
 
@@ -510,73 +510,72 @@ Log::init_fields()
   ink_hash_table_insert(field_symbol_hash, "pfsc", field);
 
   Ptr<LogFieldAliasTable> cache_code_map = NEW(new LogFieldAliasTable);
-  cache_code_map->
-    init(62,
-         SQUID_LOG_EMPTY, "UNDEFINED",
-         SQUID_LOG_TCP_HIT, "TCP_HIT",
-         SQUID_LOG_TCP_DISK_HIT, "TCP_DISK_HIT",
-         SQUID_LOG_TCP_MEM_HIT, "TCP_MEM_HIT",
-         SQUID_LOG_TCP_MISS, "TCP_MISS",
-         SQUID_LOG_TCP_EXPIRED_MISS, "TCP_EXPIRED_MISS",
-         SQUID_LOG_TCP_REFRESH_HIT, "TCP_REFRESH_HIT",
-         SQUID_LOG_TCP_REF_FAIL_HIT, "TCP_REF_FAIL_HIT",
-         SQUID_LOG_TCP_REFRESH_MISS, "TCP_REFRESH_MISS",
-         SQUID_LOG_TCP_CLIENT_REFRESH, "TCP_CLIENT_REFRESH",
-         SQUID_LOG_TCP_IMS_HIT, "TCP_IMS_HIT",
-         SQUID_LOG_TCP_IMS_MISS, "TCP_IMS_MISS",
-         SQUID_LOG_TCP_SWAPFAIL, "TCP_SWAPFAIL",
-         SQUID_LOG_TCP_DENIED, "TCP_DENIED",
-         SQUID_LOG_TCP_WEBFETCH_MISS, "TCP_WEBFETCH_MISS",
-         SQUID_LOG_TCP_SPIDER_BYPASS, "TCP_SPIDER_BYPASS",
-         SQUID_LOG_TCP_FUTURE_2, "TCP_FUTURE_2",
-         SQUID_LOG_TCP_HIT_REDIRECT, "TCP_HIT_REDIRECT",
-         SQUID_LOG_TCP_MISS_REDIRECT, "TCP_MISS_REDIRECT",
-         SQUID_LOG_TCP_HIT_X_REDIRECT, "TCP_HIT_X_REDIRECT",
-         SQUID_LOG_TCP_MISS_X_REDIRECT, "TCP_MISS_X_REDIRECT",
-         SQUID_LOG_UDP_HIT, "UDP_HIT",
-         SQUID_LOG_UDP_WEAK_HIT, "UDP_WEAK_HIT",
-         SQUID_LOG_UDP_HIT_OBJ, "UDP_HIT_OBJ",
-         SQUID_LOG_UDP_MISS, "UDP_MISS",
-         SQUID_LOG_UDP_DENIED, "UDP_DENIED",
-         SQUID_LOG_UDP_INVALID, "UDP_INVALID",
-         SQUID_LOG_UDP_RELOADING, "UDP_RELOADING",
-         SQUID_LOG_UDP_FUTURE_1, "UDP_FUTURE_1",
-         SQUID_LOG_UDP_FUTURE_2, "UDP_FUTURE_2",
-         SQUID_LOG_ERR_READ_TIMEOUT, "ERR_READ_TIMEOUT",
-         SQUID_LOG_ERR_LIFETIME_EXP, "ERR_LIFETIME_EXP",
-         SQUID_LOG_ERR_NO_CLIENTS_BIG_OBJ, "ERR_NO_CLIENTS_BIG_OBJ",
-         SQUID_LOG_ERR_READ_ERROR, "ERR_READ_ERROR",
-         SQUID_LOG_ERR_CLIENT_ABORT, "ERR_CLIENT_ABORT",
-         SQUID_LOG_ERR_CONNECT_FAIL, "ERR_CONNECT_FAIL",
-         SQUID_LOG_ERR_INVALID_REQ, "ERR_INVALID_REQ",
-         SQUID_LOG_ERR_UNSUP_REQ, "ERR_UNSUP_REQ",
-         SQUID_LOG_ERR_INVALID_URL, "ERR_INVALID_URL",
-         SQUID_LOG_ERR_NO_FDS, "ERR_NO_FDS",
-         SQUID_LOG_ERR_DNS_FAIL, "ERR_DNS_FAIL",
-         SQUID_LOG_ERR_NOT_IMPLEMENTED, "ERR_NOT_IMPLEMENTED",
-         SQUID_LOG_ERR_CANNOT_FETCH, "ERR_CANNOT_FETCH",
-         SQUID_LOG_ERR_NO_RELAY, "ERR_NO_RELAY",
-         SQUID_LOG_ERR_DISK_IO, "ERR_DISK_IO",
-         SQUID_LOG_ERR_ZERO_SIZE_OBJECT, "ERR_ZERO_SIZE_OBJECT",
-         SQUID_LOG_ERR_PROXY_DENIED, "ERR_PROXY_DENIED",
-         SQUID_LOG_ERR_WEBFETCH_DETECTED, "ERR_WEBFETCH_DETECTED",
-         SQUID_LOG_ERR_FUTURE_1, "ERR_FUTURE_1",
-         SQUID_LOG_ERR_SPIDER_MEMBER_ABORTED, "ERR_SPIDER_MEMBER_ABORTED",
-         SQUID_LOG_ERR_SPIDER_PARENTAL_CONTROL_RESTRICTION, "ERR_SPIDER_PARENTAL_CONTROL_RESTRICTION",
-         SQUID_LOG_ERR_SPIDER_UNSUPPORTED_HTTP_VERSION, "ERR_SPIDER_UNSUPPORTED_HTTP_VERSION",
-         SQUID_LOG_ERR_SPIDER_UIF, "ERR_SPIDER_UIF",
-         SQUID_LOG_ERR_SPIDER_FUTURE_USE_1, "ERR_SPIDER_FUTURE_USE_1",
-         SQUID_LOG_ERR_SPIDER_TIMEOUT_WHILE_PASSING, "ERR_SPIDER_TIMEOUT_WHILE_PASSING",
-         SQUID_LOG_ERR_SPIDER_TIMEOUT_WHILE_DRAINING, "ERR_SPIDER_TIMEOUT_WHILE_DRAINING",
-         SQUID_LOG_ERR_SPIDER_GENERAL_TIMEOUT, "ERR_SPIDER_GENERAL_TIMEOUT",
-         SQUID_LOG_ERR_SPIDER_CONNECT_FAILED, "ERR_SPIDER_CONNECT_FAILED",
-         SQUID_LOG_ERR_SPIDER_FUTURE_USE_2, "ERR_SPIDER_FUTURE_USE_2",
-         SQUID_LOG_ERR_SPIDER_NO_RESOURCES, "ERR_SPIDER_NO_RESOURCES",
-         SQUID_LOG_ERR_SPIDER_INTERNAL_ERROR, "ERR_SPIDER_INTERNAL_ERROR",
-         SQUID_LOG_ERR_SPIDER_INTERNAL_IO_ERROR, "ERR_SPIDER_INTERNAL_IO_ERROR",
-         SQUID_LOG_ERR_SPIDER_DNS_TEMP_ERROR, "ERR_SPIDER_DNS_TEMP_ERROR",
-         SQUID_LOG_ERR_SPIDER_DNS_HOST_NOT_FOUND, "ERR_SPIDER_DNS_HOST_NOT_FOUND",
-         SQUID_LOG_ERR_SPIDER_DNS_NO_ADDRESS, "ERR_SPIDER_DNS_NO_ADDRESS", SQUID_LOG_ERR_UNKNOWN, "ERR_UNKNOWN");
+  cache_code_map->init(62,
+                       SQUID_LOG_EMPTY, "UNDEFINED",
+                       SQUID_LOG_TCP_HIT, "TCP_HIT",
+                       SQUID_LOG_TCP_DISK_HIT, "TCP_DISK_HIT",
+                       SQUID_LOG_TCP_MEM_HIT, "TCP_MEM_HIT",
+                       SQUID_LOG_TCP_MISS, "TCP_MISS",
+                       SQUID_LOG_TCP_EXPIRED_MISS, "TCP_EXPIRED_MISS",
+                       SQUID_LOG_TCP_REFRESH_HIT, "TCP_REFRESH_HIT",
+                       SQUID_LOG_TCP_REF_FAIL_HIT, "TCP_REF_FAIL_HIT",
+                       SQUID_LOG_TCP_REFRESH_MISS, "TCP_REFRESH_MISS",
+                       SQUID_LOG_TCP_CLIENT_REFRESH, "TCP_CLIENT_REFRESH",
+                       SQUID_LOG_TCP_IMS_HIT, "TCP_IMS_HIT",
+                       SQUID_LOG_TCP_IMS_MISS, "TCP_IMS_MISS",
+                       SQUID_LOG_TCP_SWAPFAIL, "TCP_SWAPFAIL",
+                       SQUID_LOG_TCP_DENIED, "TCP_DENIED",
+                       SQUID_LOG_TCP_WEBFETCH_MISS, "TCP_WEBFETCH_MISS",
+                       SQUID_LOG_TCP_SPIDER_BYPASS, "TCP_SPIDER_BYPASS",
+                       SQUID_LOG_TCP_FUTURE_2, "TCP_FUTURE_2",
+                       SQUID_LOG_TCP_HIT_REDIRECT, "TCP_HIT_REDIRECT",
+                       SQUID_LOG_TCP_MISS_REDIRECT, "TCP_MISS_REDIRECT",
+                       SQUID_LOG_TCP_HIT_X_REDIRECT, "TCP_HIT_X_REDIRECT",
+                       SQUID_LOG_TCP_MISS_X_REDIRECT, "TCP_MISS_X_REDIRECT",
+                       SQUID_LOG_UDP_HIT, "UDP_HIT",
+                       SQUID_LOG_UDP_WEAK_HIT, "UDP_WEAK_HIT",
+                       SQUID_LOG_UDP_HIT_OBJ, "UDP_HIT_OBJ",
+                       SQUID_LOG_UDP_MISS, "UDP_MISS",
+                       SQUID_LOG_UDP_DENIED, "UDP_DENIED",
+                       SQUID_LOG_UDP_INVALID, "UDP_INVALID",
+                       SQUID_LOG_UDP_RELOADING, "UDP_RELOADING",
+                       SQUID_LOG_UDP_FUTURE_1, "UDP_FUTURE_1",
+                       SQUID_LOG_UDP_FUTURE_2, "UDP_FUTURE_2",
+                       SQUID_LOG_ERR_READ_TIMEOUT, "ERR_READ_TIMEOUT",
+                       SQUID_LOG_ERR_LIFETIME_EXP, "ERR_LIFETIME_EXP",
+                       SQUID_LOG_ERR_NO_CLIENTS_BIG_OBJ, "ERR_NO_CLIENTS_BIG_OBJ",
+                       SQUID_LOG_ERR_READ_ERROR, "ERR_READ_ERROR",
+                       SQUID_LOG_ERR_CLIENT_ABORT, "ERR_CLIENT_ABORT",
+                       SQUID_LOG_ERR_CONNECT_FAIL, "ERR_CONNECT_FAIL",
+                       SQUID_LOG_ERR_INVALID_REQ, "ERR_INVALID_REQ",
+                       SQUID_LOG_ERR_UNSUP_REQ, "ERR_UNSUP_REQ",
+                       SQUID_LOG_ERR_INVALID_URL, "ERR_INVALID_URL",
+                       SQUID_LOG_ERR_NO_FDS, "ERR_NO_FDS",
+                       SQUID_LOG_ERR_DNS_FAIL, "ERR_DNS_FAIL",
+                       SQUID_LOG_ERR_NOT_IMPLEMENTED, "ERR_NOT_IMPLEMENTED",
+                       SQUID_LOG_ERR_CANNOT_FETCH, "ERR_CANNOT_FETCH",
+                       SQUID_LOG_ERR_NO_RELAY, "ERR_NO_RELAY",
+                       SQUID_LOG_ERR_DISK_IO, "ERR_DISK_IO",
+                       SQUID_LOG_ERR_ZERO_SIZE_OBJECT, "ERR_ZERO_SIZE_OBJECT",
+                       SQUID_LOG_ERR_PROXY_DENIED, "ERR_PROXY_DENIED",
+                       SQUID_LOG_ERR_WEBFETCH_DETECTED, "ERR_WEBFETCH_DETECTED",
+                       SQUID_LOG_ERR_FUTURE_1, "ERR_FUTURE_1",
+                       SQUID_LOG_ERR_SPIDER_MEMBER_ABORTED, "ERR_SPIDER_MEMBER_ABORTED",
+                       SQUID_LOG_ERR_SPIDER_PARENTAL_CONTROL_RESTRICTION, "ERR_SPIDER_PARENTAL_CONTROL_RESTRICTION",
+                       SQUID_LOG_ERR_SPIDER_UNSUPPORTED_HTTP_VERSION, "ERR_SPIDER_UNSUPPORTED_HTTP_VERSION",
+                       SQUID_LOG_ERR_SPIDER_UIF, "ERR_SPIDER_UIF",
+                       SQUID_LOG_ERR_SPIDER_FUTURE_USE_1, "ERR_SPIDER_FUTURE_USE_1",
+                       SQUID_LOG_ERR_SPIDER_TIMEOUT_WHILE_PASSING, "ERR_SPIDER_TIMEOUT_WHILE_PASSING",
+                       SQUID_LOG_ERR_SPIDER_TIMEOUT_WHILE_DRAINING, "ERR_SPIDER_TIMEOUT_WHILE_DRAINING",
+                       SQUID_LOG_ERR_SPIDER_GENERAL_TIMEOUT, "ERR_SPIDER_GENERAL_TIMEOUT",
+                       SQUID_LOG_ERR_SPIDER_CONNECT_FAILED, "ERR_SPIDER_CONNECT_FAILED",
+                       SQUID_LOG_ERR_SPIDER_FUTURE_USE_2, "ERR_SPIDER_FUTURE_USE_2",
+                       SQUID_LOG_ERR_SPIDER_NO_RESOURCES, "ERR_SPIDER_NO_RESOURCES",
+                       SQUID_LOG_ERR_SPIDER_INTERNAL_ERROR, "ERR_SPIDER_INTERNAL_ERROR",
+                       SQUID_LOG_ERR_SPIDER_INTERNAL_IO_ERROR, "ERR_SPIDER_INTERNAL_IO_ERROR",
+                       SQUID_LOG_ERR_SPIDER_DNS_TEMP_ERROR, "ERR_SPIDER_DNS_TEMP_ERROR",
+                       SQUID_LOG_ERR_SPIDER_DNS_HOST_NOT_FOUND, "ERR_SPIDER_DNS_HOST_NOT_FOUND",
+                       SQUID_LOG_ERR_SPIDER_DNS_NO_ADDRESS, "ERR_SPIDER_DNS_NO_ADDRESS", SQUID_LOG_ERR_UNKNOWN, "ERR_UNKNOWN");
   field = NEW(new LogField("cache_result_code", "crc",
                            LogField::sINT,
                            &LogAccess::marshal_cache_result_code,
@@ -621,44 +620,43 @@ Log::init_fields()
   ink_hash_table_insert(field_symbol_hash, "pqsi", field);
 
   Ptr<LogFieldAliasTable> hierarchy_map = NEW(new LogFieldAliasTable);
-  hierarchy_map->
-    init(36,
-         SQUID_HIER_EMPTY, "EMPTY",
-         SQUID_HIER_NONE, "NONE",
-         SQUID_HIER_DIRECT, "DIRECT",
-         SQUID_HIER_SIBLING_HIT, "SIBLING_HIT",
-         SQUID_HIER_PARENT_HIT, "PARENT_HIT",
-         SQUID_HIER_DEFAULT_PARENT, "DEFAULT_PARENT",
-         SQUID_HIER_SINGLE_PARENT, "SINGLE_PARENT",
-         SQUID_HIER_FIRST_UP_PARENT, "FIRST_UP_PARENT",
-         SQUID_HIER_NO_PARENT_DIRECT, "NO_PARENT_DIRECT",
-         SQUID_HIER_FIRST_PARENT_MISS, "FIRST_PARENT_MISS",
-         SQUID_HIER_LOCAL_IP_DIRECT, "LOCAL_IP_DIRECT",
-         SQUID_HIER_FIREWALL_IP_DIRECT, "FIREWALL_IP_DIRECT",
-         SQUID_HIER_NO_DIRECT_FAIL, "NO_DIRECT_FAIL",
-         SQUID_HIER_SOURCE_FASTEST, "SOURCE_FASTEST",
-         SQUID_HIER_SIBLING_UDP_HIT_OBJ, "SIBLING_UDP_HIT_OBJ",
-         SQUID_HIER_PARENT_UDP_HIT_OBJ, "PARENT_UDP_HIT_OBJ",
-         SQUID_HIER_PASSTHROUGH_PARENT, "PASSTHROUGH_PARENT",
-         SQUID_HIER_SSL_PARENT_MISS, "SSL_PARENT_MISS",
-         SQUID_HIER_INVALID_CODE, "INVALID_CODE",
-         SQUID_HIER_TIMEOUT_DIRECT, "TIMEOUT_DIRECT",
-         SQUID_HIER_TIMEOUT_SIBLING_HIT, "TIMEOUT_SIBLING_HIT",
-         SQUID_HIER_TIMEOUT_PARENT_HIT, "TIMEOUT_PARENT_HIT",
-         SQUID_HIER_TIMEOUT_DEFAULT_PARENT, "TIMEOUT_DEFAULT_PARENT",
-         SQUID_HIER_TIMEOUT_SINGLE_PARENT, "TIMEOUT_SINGLE_PARENT",
-         SQUID_HIER_TIMEOUT_FIRST_UP_PARENT, "TIMEOUT_FIRST_UP_PARENT",
-         SQUID_HIER_TIMEOUT_NO_PARENT_DIRECT, "TIMEOUT_NO_PARENT_DIRECT",
-         SQUID_HIER_TIMEOUT_FIRST_PARENT_MISS, "TIMEOUT_FIRST_PARENT_MISS",
-         SQUID_HIER_TIMEOUT_LOCAL_IP_DIRECT, "TIMEOUT_LOCAL_IP_DIRECT",
-         SQUID_HIER_TIMEOUT_FIREWALL_IP_DIRECT, "TIMEOUT_FIREWALL_IP_DIRECT",
-         SQUID_HIER_TIMEOUT_NO_DIRECT_FAIL, "TIMEOUT_NO_DIRECT_FAIL",
-         SQUID_HIER_TIMEOUT_SOURCE_FASTEST, "TIMEOUT_SOURCE_FASTEST",
-         SQUID_HIER_TIMEOUT_SIBLING_UDP_HIT_OBJ, "TIMEOUT_SIBLING_UDP_HIT_OBJ",
-         SQUID_HIER_TIMEOUT_PARENT_UDP_HIT_OBJ, "TIMEOUT_PARENT_UDP_HIT_OBJ",
-         SQUID_HIER_TIMEOUT_PASSTHROUGH_PARENT, "TIMEOUT_PASSTHROUGH_PARENT",
-         SQUID_HIER_TIMEOUT_TIMEOUT_SSL_PARENT_MISS, "TIMEOUT_TIMEOUT_SSL_PARENT_MISS",
-         SQUID_HIER_INVALID_ASSIGNED_CODE, "INVALID_ASSIGNED_CODE");
+  hierarchy_map->init(36,
+                      SQUID_HIER_EMPTY, "EMPTY",
+                      SQUID_HIER_NONE, "NONE",
+                      SQUID_HIER_DIRECT, "DIRECT",
+                      SQUID_HIER_SIBLING_HIT, "SIBLING_HIT",
+                      SQUID_HIER_PARENT_HIT, "PARENT_HIT",
+                      SQUID_HIER_DEFAULT_PARENT, "DEFAULT_PARENT",
+                      SQUID_HIER_SINGLE_PARENT, "SINGLE_PARENT",
+                      SQUID_HIER_FIRST_UP_PARENT, "FIRST_UP_PARENT",
+                      SQUID_HIER_NO_PARENT_DIRECT, "NO_PARENT_DIRECT",
+                      SQUID_HIER_FIRST_PARENT_MISS, "FIRST_PARENT_MISS",
+                      SQUID_HIER_LOCAL_IP_DIRECT, "LOCAL_IP_DIRECT",
+                      SQUID_HIER_FIREWALL_IP_DIRECT, "FIREWALL_IP_DIRECT",
+                      SQUID_HIER_NO_DIRECT_FAIL, "NO_DIRECT_FAIL",
+                      SQUID_HIER_SOURCE_FASTEST, "SOURCE_FASTEST",
+                      SQUID_HIER_SIBLING_UDP_HIT_OBJ, "SIBLING_UDP_HIT_OBJ",
+                      SQUID_HIER_PARENT_UDP_HIT_OBJ, "PARENT_UDP_HIT_OBJ",
+                      SQUID_HIER_PASSTHROUGH_PARENT, "PASSTHROUGH_PARENT",
+                      SQUID_HIER_SSL_PARENT_MISS, "SSL_PARENT_MISS",
+                      SQUID_HIER_INVALID_CODE, "INVALID_CODE",
+                      SQUID_HIER_TIMEOUT_DIRECT, "TIMEOUT_DIRECT",
+                      SQUID_HIER_TIMEOUT_SIBLING_HIT, "TIMEOUT_SIBLING_HIT",
+                      SQUID_HIER_TIMEOUT_PARENT_HIT, "TIMEOUT_PARENT_HIT",
+                      SQUID_HIER_TIMEOUT_DEFAULT_PARENT, "TIMEOUT_DEFAULT_PARENT",
+                      SQUID_HIER_TIMEOUT_SINGLE_PARENT, "TIMEOUT_SINGLE_PARENT",
+                      SQUID_HIER_TIMEOUT_FIRST_UP_PARENT, "TIMEOUT_FIRST_UP_PARENT",
+                      SQUID_HIER_TIMEOUT_NO_PARENT_DIRECT, "TIMEOUT_NO_PARENT_DIRECT",
+                      SQUID_HIER_TIMEOUT_FIRST_PARENT_MISS, "TIMEOUT_FIRST_PARENT_MISS",
+                      SQUID_HIER_TIMEOUT_LOCAL_IP_DIRECT, "TIMEOUT_LOCAL_IP_DIRECT",
+                      SQUID_HIER_TIMEOUT_FIREWALL_IP_DIRECT, "TIMEOUT_FIREWALL_IP_DIRECT",
+                      SQUID_HIER_TIMEOUT_NO_DIRECT_FAIL, "TIMEOUT_NO_DIRECT_FAIL",
+                      SQUID_HIER_TIMEOUT_SOURCE_FASTEST, "TIMEOUT_SOURCE_FASTEST",
+                      SQUID_HIER_TIMEOUT_SIBLING_UDP_HIT_OBJ, "TIMEOUT_SIBLING_UDP_HIT_OBJ",
+                      SQUID_HIER_TIMEOUT_PARENT_UDP_HIT_OBJ, "TIMEOUT_PARENT_UDP_HIT_OBJ",
+                      SQUID_HIER_TIMEOUT_PASSTHROUGH_PARENT, "TIMEOUT_PASSTHROUGH_PARENT",
+                      SQUID_HIER_TIMEOUT_TIMEOUT_SSL_PARENT_MISS, "TIMEOUT_TIMEOUT_SSL_PARENT_MISS",
+                      SQUID_HIER_INVALID_ASSIGNED_CODE, "INVALID_ASSIGNED_CODE");
   field = NEW(new LogField("proxy_hierarchy_route", "phr",
                            LogField::sINT,
                            &LogAccess::marshal_proxy_hierarchy_route,
@@ -784,7 +782,7 @@ Log::init_fields()
   Ptr<LogFieldAliasTable> entry_type_map = NEW(new LogFieldAliasTable);
   entry_type_map->init(N_LOG_ENTRY_TYPES,
                        LOG_ENTRY_HTTP, "LOG_ENTRY_HTTP",
-                       LOG_ENTRY_ICP, "LOG_ENTRY_ICP", LOG_ENTRY_MIXT, "LOG_ENTRY_MIXT");
+                       LOG_ENTRY_ICP, "LOG_ENTRY_ICP");
   field = NEW(new LogField("log_entry_type", "etype",
                            LogField::sINT,
                            &LogAccess::marshal_entry_type,
@@ -829,104 +827,74 @@ Log::init_fields()
     ink_hash_table_insert(field_symbol_hash, symbol, field)
 
   // This field is for the client DNS name.
-  // For some protocols (such as WMT), the client itself sends the DNS
-  // name to the server in a logging message. This field logs that.
   // It's probably expensive to do DNS lookups, so this field should normally
   // be blank unless the protocol allows an inexpensive way to determine
   // the client DNS name.
   //
-  // For WMT, this is equivalent to c-dns
-  //
   ADD_LOG_FIELD("client_dns_name", "cdns", LogField::STRING,
                 &LogAccess::marshal_client_dns_name, &LogAccess::unmarshal_str);
 
   // This field is for the client operating system name.
   //
-  // For WMT, this is equivalent to c-os
-  //
   ADD_LOG_FIELD("client_dns_name", "cos", LogField::STRING, &LogAccess::marshal_client_os, &LogAccess::unmarshal_str);
 
   // This field is for the client operating system version.
   //
-  // For WMT, this is equivalent to c-osversion
-  //
   ADD_LOG_FIELD("client_os_version", "cosv", LogField::STRING,
                 &LogAccess::marshal_client_os_version, &LogAccess::unmarshal_str);
 
   // This field is for the client CPU type.
   //
-  // For WMT, this is equivalent to c-cpu
-  //
   ADD_LOG_FIELD("client_cpu", "ccpu", LogField::STRING, &LogAccess::marshal_client_cpu, &LogAccess::unmarshal_str);
 
   // This field is for the client player version.
   //
-  // For WMT, this is equivalent to c-playerversion
-  //
   ADD_LOG_FIELD("client_player_version", "cplyv", LogField::STRING,
                 &LogAccess::marshal_client_player_version, &LogAccess::unmarshal_str);
 
   // This field is for the client player lanaguage.
   //
-  // For WMT, this is equivalent to c-playerlanguage.
-  //
   ADD_LOG_FIELD("client_player_language", "clang", LogField::STRING,
                 &LogAccess::marshal_client_player_language, &LogAccess::unmarshal_str);
 
   // This field is for the client user agent.
   //
-  // For WMT, this is equivalent to c(User-Agent)
-  //
   ADD_LOG_FIELD("client_user_agent", "cua", LogField::STRING,
                 &LogAccess::marshal_client_user_agent, &LogAccess::unmarshal_str);
 
   // This field is for the URL of the referrer.
   //
-  // For WMT, this is equivalent to c(Referer)
-  //
   ADD_LOG_FIELD("referer_url", "rfurl", LogField::STRING, &LogAccess::marshal_referer_url, &LogAccess::unmarshal_str);
 
   // This field is for the audio codec used by the player.
   //
-  // For WMT, this is equivalent to audiocodec
-  //
   ADD_LOG_FIELD("audio_codec", "audcdc", LogField::STRING, &LogAccess::marshal_audio_codec, &LogAccess::unmarshal_str);
 
   // This field is for the video codec used by the player.
   //
-  // For WMT, this is equivalent to videocodec
-  //
   ADD_LOG_FIELD("video_codec", "vidcdc", LogField::STRING, &LogAccess::marshal_video_codec, &LogAccess::unmarshal_str);
 
   // This field is for the number of bytes received by the client
   // as reported by the client.
   //
-  // For WMT, this is equivalent to c-bytes
-  //
   ADD_LOG_FIELD("client_bytes_received", "cbytr", LogField::sINT,
                 &LogAccess::marshal_client_bytes_received, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of packets received by the client
   // as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkts-received
-  //
   ADD_LOG_FIELD("client_pkts_received", "cpktr", LogField::sINT,
                 &LogAccess::marshal_client_pkts_received, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of lost packets during transmission
   // from server to client as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkts-lost-client
-  //
   ADD_LOG_FIELD("client_lost_pkts", "cpktl", LogField::sINT,
                 &LogAccess::marshal_client_lost_pkts, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of lost packets in the network layer
   // as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkts-lost-net
-  //
   ADD_LOG_FIELD("client_lost_net_pkts", "cpktln", LogField::sINT,
                 &LogAccess::marshal_client_lost_net_pkts, &LogAccess::unmarshal_int_to_str);
 
@@ -934,54 +902,40 @@ Log::init_fields()
   // transmission from the server to a client on the network layer as
   // reported by the client.
   //
-  // For WMT, this is equivalent to c-lost-cont-net
-  //
   ADD_LOG_FIELD("client_lost_continuous_pkts", "cpktlcn", LogField::sINT,
                 &LogAccess::marshal_client_lost_continuous_pkts, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of packets recovered using ECC
   // as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkts-recovered-ECC
-  //
   ADD_LOG_FIELD("client_pkts_ecc_recover", "cpktecc", LogField::sINT,
                 &LogAccess::marshal_client_pkts_ecc_recover, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of packets recovered from resent
   // requests as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkts-recovered-resent
-  //
   ADD_LOG_FIELD("client_pkts_resent_recover", "crstrc", LogField::sINT,
                 &LogAccess::marshal_client_pkts_resent_recover, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of resend requests sent by the client
   // as reported by the client.
   //
-  // For WMT, this is equivalent to c-pkt-resendreqs
-  //
   ADD_LOG_FIELD("client_resend_request", "crstrq", LogField::sINT,
                 &LogAccess::marshal_client_resend_request, &LogAccess::unmarshal_int_to_str);
 
   // This field is for the number of rebuffers as reported by the
   // client.
   //
-  // For WMT, this is equivalent to c-buffercount
-  //
   ADD_LOG_FIELD("client_buffer_count", "cbufc", LogField::sINT,
                 &LogAccess::marshal_client_buffer_count, &LogAccess::unmarshal_int_to_str);
 
   // This field is the total buffer time of a client in seconds.
   //
-  // For WMT, this is equivalent to c-totalbuffertime
-  //
   ADD_LOG_FIELD("client_buffer_ts", "cbufs", LogField::sINT,
                 &LogAccess::marshal_client_buffer_ts, &LogAccess::unmarshal_int_to_str);
 
   // This field is the percent quality as reported by the client.
   //
-  // For WMT, this is equivalent to c-quality
-  //
   ADD_LOG_FIELD("client_quality_per", "cqalp", LogField::sINT,
                 &LogAccess::marshal_client_quality_per, &LogAccess::unmarshal_int_to_str);
 
@@ -1003,7 +957,7 @@ Log::handle_logging_mode_change(const ch
   NOWARN_UNUSED(data_type);
   NOWARN_UNUSED(data);
   NOWARN_UNUSED(cookie);
-  Debug("log2-config", "Enabled status changed");
+  Debug("log-config", "Enabled status changed");
   logging_mode_changed = true;
   return 0;
 }
@@ -1040,7 +994,6 @@ Log::init(int flags)
   } else {
 
     log_rsb = RecAllocateRawStatBlock((int) log_stat_count);
-    LogConfig::register_configs();
     LogConfig::register_stat_callbacks();
 
     config->read_configuration_variables();
@@ -1050,10 +1003,10 @@ Log::init(int flags)
       logging_mode = LOG_TRANSACTIONS_ONLY;
       config->collation_mode = LogConfig::COLLATION_HOST;
     } else {
-      int val = (int) LOG_ConfigReadInteger("proxy.config.log2.logging_enabled");
+      int val = (int) LOG_ConfigReadInteger("proxy.config.log.logging_enabled");
       if (val<LOG_NOTHING || val> FULL_LOGGING) {
         logging_mode = FULL_LOGGING;
-        Warning("proxy.config.log2.logging_enabled has an invalid " "value, setting it to %d", logging_mode);
+        Warning("proxy.config.log.logging_enabled has an invalid " "value, setting it to %d", logging_mode);
       } else {
         logging_mode = (LoggingMode) val;
       }
@@ -1064,8 +1017,8 @@ Log::init(int flags)
 
     // Clear any stat values that need to be reset on startup
     //
-    LOG_CLEAR_DYN_STAT(log2_stat_log_files_open_stat);
-    LOG_CLEAR_DYN_STAT(log2_stat_log_files_space_used_stat);
+    LOG_CLEAR_DYN_STAT(log_stat_log_files_open_stat);
+    LOG_CLEAR_DYN_STAT(log_stat_log_files_space_used_stat);
 /*
         The following variables are not cleared at startup, although
 	we probably should because otherwise their meaning is not very
@@ -1073,21 +1026,21 @@ Log::init(int flags)
 	these values since the Traffic Server was setup on the
 	machine?
 
-	LOG_CLEAR_DYN_STAT(log2_stat_bytes_written_to_disk_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_bytes_sent_to_network_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_bytes_received_from_network_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_event_log_access_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_event_log_access_skip_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_event_log_access_fail_stat);
-	LOG_CLEAR_DYN_STAT(log2_stat_event_log_error_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_bytes_written_to_disk_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_bytes_sent_to_network_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_bytes_received_from_network_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_event_log_access_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_event_log_access_skip_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_event_log_access_fail_stat);
+	LOG_CLEAR_DYN_STAT(log_stat_event_log_error_stat);
 */
     // if remote management is enabled, do all necessary initialization to
     // be able to handle a logging mode change
     //
     if (!(config_flags & NO_REMOTE_MANAGEMENT)) {
 
-      LOG_RegisterConfigUpdateFunc("proxy.config.log2.logging_enabled", &Log::handle_logging_mode_change, NULL);
-      LOG_RegisterLocalUpdateFunc("proxy.local.log2.collation_mode", &Log::handle_logging_mode_change, NULL);
+      LOG_RegisterConfigUpdateFunc("proxy.config.log.logging_enabled", &Log::handle_logging_mode_change, NULL);
+      LOG_RegisterLocalUpdateFunc("proxy.local.log.collation_mode", &Log::handle_logging_mode_change, NULL);
     }
   }
 }
@@ -1133,7 +1086,7 @@ Log::_init()
   }
 
   Note("logging initialized[%d], logging_mode = %d", init_status, logging_mode);
-  if (is_debug_tag_set("log2-config")) {
+  if (is_debug_tag_set("log-config")) {
     config->display();
   }
 }
@@ -1202,17 +1155,17 @@ Log::access(LogAccess * lad)
   if (Log::config->sampling_frequency > 1) {
     this_sample = sample++;
     if (this_sample && this_sample % Log::config->sampling_frequency) {
-      Debug("log2", "sampling, skipping this entry ...");
+      Debug("log", "sampling, skipping this entry ...");
       ret = Log::SKIP;
       goto done;
     } else {
-      Debug("log2", "sampling, LOGGING this entry ...");
+      Debug("log", "sampling, LOGGING this entry ...");
       sample = 1;
     }
   }
 
   if (Log::config->log_object_manager.get_num_objects() == 0) {
-    Debug("log2", "no log objects, skipping this entry ...");
+    Debug("log", "no log objects, skipping this entry ...");
     ret = Log::SKIP;
     goto done;
   }
@@ -1252,7 +1205,7 @@ Log::error(const char *format, ...)
 
     if (ret_val == Log::LOG_OK) {
       ProxyMutex *mutex = this_ethread()->mutex;
-      LOG_INCREMENT_DYN_STAT(log2_stat_event_log_error_stat);
+      LOG_INCREMENT_DYN_STAT(log_stat_event_log_error_stat);
     }
   }
   return ret_val;
@@ -1269,7 +1222,7 @@ Log::va_error(char *format, va_list ap)
 
     if (ret_val == Log::LOG_OK) {
       ProxyMutex *mutex = this_ethread()->mutex;
-      LOG_INCREMENT_DYN_STAT(log2_stat_event_log_error_stat);
+      LOG_INCREMENT_DYN_STAT(log_stat_event_log_error_stat);
     }
   }
   return ret_val;
@@ -1289,7 +1242,7 @@ Log::flush_thread_main(void *args)
   time_t now, last_time = 0;
   size_t total_bytes, bytes_to_disk, bytes_to_net, bytes_to_pipe;
 
-  Debug("log2-flush", "Log flush thread is alive ...");
+  Debug("log-flush", "Log flush thread is alive ...");
 
   while (true) {
     ink_timestruc timeout_time;
@@ -1304,18 +1257,20 @@ Log::flush_thread_main(void *args)
 
     // Update statistics
     //
-    LOG_SUM_GLOBAL_DYN_STAT(log2_stat_bytes_written_to_disk_stat, bytes_to_disk);
-    LOG_SUM_GLOBAL_DYN_STAT(log2_stat_bytes_sent_to_network_stat, bytes_to_net);
+    LOG_SUM_GLOBAL_DYN_STAT(log_stat_bytes_written_to_disk_stat, bytes_to_disk);
+    LOG_SUM_GLOBAL_DYN_STAT(log_stat_bytes_sent_to_network_stat, bytes_to_net);
 
-    Debug("log2-flush", "%d bytes flushed this round [ %d to disk, %d to net, %d to pipe]",
+    Debug("log-flush", "%d bytes flushed this round [ %d to disk, %d to net, %d to pipe]",
           total_bytes, bytes_to_disk, bytes_to_net, bytes_to_pipe);
 
     // Time to work on periodic events??
     //
     now = time(NULL);
     if (now > last_time) {
-      Debug("log2-flush", "periodic tasks for %ld", now);
-      periodic_tasks(now);
+      if ((now % PERIODIC_TASKS_INTERVAL) == 0) {
+        Debug("log-flush", "periodic tasks for %ld", now);
+        periodic_tasks(now);
+      }
       last_time = (now = time(NULL));
     }
     // wait for more work; a spurious wake-up is ok since we'll just
@@ -1360,7 +1315,7 @@ Log::collate_thread_main(void *args)
   int new_client;
 
 
-  Debug("log2-thread", "Log collation thread is alive ...");
+  Debug("log-thread", "Log collation thread is alive ...");
 
   while (true) {
     ink_assert(Log::config != NULL);
@@ -1377,7 +1332,7 @@ Log::collate_thread_main(void *args)
     // work.  We still need to keep checking whether we're a collation
     // host to account for a reconfiguration.
     //
-    Debug("log2-sock", "collation thread starting, creating LogSock");
+    Debug("log-sock", "collation thread starting, creating LogSock");
     sock = NEW(new LogSock(LogSock::LS_CONST_CLUSTER_MAX_MACHINES));
     ink_assert(sock != NULL);
 
@@ -1400,11 +1355,11 @@ Log::collate_thread_main(void *args)
       }
 
       if (sock->pending_connect(0)) {
-        Debug("log2-sock", "pending connection ...");
+        Debug("log-sock", "pending connection ...");
         if ((new_client = sock->accept()) < 0) {
-          Debug("log2-sock", "error accepting new collation client");
+          Debug("log-sock", "error accepting new collation client");
         } else {
-          Debug("log2-sock", "connection %d accepted", new_client);
+          Debug("log-sock", "connection %d accepted", new_client);
           if (!sock->authorized_client(new_client, Log::config->collation_secret)) {
             Warning("Unauthorized client connecting to " "log collation port; connection refused.");
             sock->close(new_client);
@@ -1418,10 +1373,10 @@ Log::collate_thread_main(void *args)
         continue;
       }
 
-      Debug("log2-sock", "pending message ...");
+      Debug("log-sock", "pending message ...");
       header = (LogBufferHeader *) sock->read_alloc(sock_id, &bytes_read);
       if (!header) {
-        Debug("log2-sock", "Error reading LogBuffer from collation client");
+        Debug("log-sock", "Error reading LogBuffer from collation client");
         continue;
       }
 
@@ -1433,8 +1388,8 @@ Log::collate_thread_main(void *args)
         continue;
       }
 
-      Debug("log2-sock", "message accepted, size = %d", bytes_read);
-      LOG_SUM_GLOBAL_DYN_STAT(log2_stat_bytes_received_from_network_stat, bytes_read);
+      Debug("log-sock", "message accepted, size = %d", bytes_read);
+      LOG_SUM_GLOBAL_DYN_STAT(log_stat_bytes_received_from_network_stat, bytes_read);
 
       obj = match_logobject(header);
       if (!obj) {
@@ -1443,7 +1398,7 @@ Log::collate_thread_main(void *args)
       }
 
       format = obj->m_format;
-      Debug("log2-sock", "Using format '%s'", format->name());
+      Debug("log-sock", "Using format '%s'", format->name());
 
       delete[]header;
 
@@ -1456,7 +1411,7 @@ Log::collate_thread_main(void *args)
 //          ink_mutex_release (&flush_mutex);
     }
 
-    Debug("log2", "no longer collation host, deleting LogSock");
+    Debug("log", "no longer collation host, deleting LogSock");
     delete sock;
   }
   /* NOTREACHED */

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.cc Tue Nov 30 01:42:55 2010
@@ -85,7 +85,7 @@ LogAccess::init()
 int
 LogAccess::marshal_client_host_ip(char *buf)
 {
-  DEFAULT_INT_FIELD;
+  DEFAULT_STR_FIELD;
 }
 
 /*-------------------------------------------------------------------------
@@ -1480,16 +1480,16 @@ char *
 resolve_logfield_string(LogAccess * context, const char *format_str)
 {
   if (!context) {
-    Debug("log2-resolve", "No context to resolve?");
+    Debug("log-resolve", "No context to resolve?");
     return NULL;
   }
 
   if (!format_str) {
-    Debug("log2-resolve", "No format to resolve?");
+    Debug("log-resolve", "No format to resolve?");
     return NULL;
   }
 
-  Debug("log2-resolve", "Resolving: %s", format_str);
+  Debug("log-resolve", "Resolving: %s", format_str);
 
   //
   // Divide the format string into two parts: one for the printf-style
@@ -1500,8 +1500,8 @@ resolve_logfield_string(LogAccess * cont
   int n_fields = LogFormat::parse_format_string(format_str,
                                                 &printf_str, &fields_str);
 
-  Debug("log2-resolve", "%d fields: %s", n_fields, fields_str);
-  Debug("log2-resolve", "printf string: %s", printf_str);
+  Debug("log-resolve", "%d fields: %s", n_fields, fields_str);
+  Debug("log-resolve", "printf string: %s", printf_str);
 
   //
   // Make sure that we delete these strings no matter how we exit
@@ -1514,7 +1514,7 @@ resolve_logfield_string(LogAccess * cont
   // format_str.
   //
   if (!n_fields) {
-    Debug("log2-resolve", "No fields found; returning copy of format_str");
+    Debug("log-resolve", "No fields found; returning copy of format_str");
     return xstrdup(format_str);
   }
 
@@ -1524,7 +1524,7 @@ resolve_logfield_string(LogAccess * cont
                                                    &contains_aggregates);
 
   if (field_count != n_fields) {
-    Debug("log2-resolve", "format_str contains %d invalid field symbols", n_fields - field_count);
+    Debug("log-resolve", "format_str contains %d invalid field symbols", n_fields - field_count);
     return NULL;
   }
   //
@@ -1532,14 +1532,14 @@ resolve_logfield_string(LogAccess * cont
   // temporary storage buffer.  Make sure the LogAccess context is
   // initialized first.
   //
-  Debug("log2-resolve", "Marshaling data from LogAccess into buffer ...");
+  Debug("log-resolve", "Marshaling data from LogAccess into buffer ...");
   context->init();
   unsigned bytes_needed = fields.marshal_len(context);
   char *buf = (char *) xmalloc(bytes_needed);
   ink_assert(buf != NULL);
   unsigned bytes_used = fields.marshal(context, buf);
   ink_assert(bytes_needed == bytes_used);
-  Debug("log2-resolve", "    %u bytes marshalled", bytes_used);
+  Debug("log-resolve", "    %u bytes marshalled", bytes_used);
 
   //
   // Now we can "unmarshal" the data from the buffer into a string,

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.h?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.h (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogAccess.h Tue Nov 30 01:42:55 2010
@@ -123,7 +123,6 @@ enum LogEntryType
 {
   LOG_ENTRY_HTTP = 0,
   LOG_ENTRY_ICP,
-  LOG_ENTRY_MIXT,
   N_LOG_ENTRY_TYPES
 };
 
@@ -162,7 +161,7 @@ public:
   //
   // client -> proxy fields
   //
-  inkcoreapi virtual int marshal_client_host_ip(char *);        // INT
+  inkcoreapi virtual int marshal_client_host_ip(char *);        // STR
   inkcoreapi virtual int marshal_client_auth_user_name(char *); // STR
   int marshal_client_req_timestamp_sec(char *); // INT
 

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.cc Tue Nov 30 01:42:55 2010
@@ -140,11 +140,17 @@ LogAccessHttp::init()
 int
 LogAccessHttp::marshal_client_host_ip(char *buf)
 {
+  char *str = NULL;
+  int len = INK_MIN_ALIGN;
+  char buffer[INET6_ADDRSTRLEN];
+
+  str = const_cast<char*>(ink_inet_ntop(((struct sockaddr *)&(m_http_sm->t_state.client_info.addr)), buffer, sizeof(buffer)));
+  len = LogAccess::strlen(str);
+
   if (buf) {
-    unsigned int ip = m_http_sm->t_state.client_info.ip;
-    marshal_int(buf, (int64)ntohl(ip));
+    marshal_str (buf, str, len);
   }
-  return INK_MIN_ALIGN;
+  return len;
 }
 
 /*-------------------------------------------------------------------------

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.h?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.h (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogAccessHttp.h Tue Nov 30 01:42:55 2010
@@ -56,7 +56,7 @@ public:
   //
   // client -> proxy fields
   //
-  virtual int marshal_client_host_ip(char *);   // INT
+  virtual int marshal_client_host_ip(char *);   // STR
   virtual int marshal_client_auth_user_name(char *);    // STR
   virtual int marshal_client_req_text(char *);  // STR
   virtual int marshal_client_req_http_method(char *);   // INT

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogBuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogBuffer.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogBuffer.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogBuffer.cc Tue Nov 30 01:42:55 2010
@@ -276,7 +276,7 @@ LogBuffer::LogBuffer(LogObject * owner, 
 {
   size_t hdr_size;
 
-//    Debug("log2-logbuffer","LogBuffer::LogBuffer(owner,size=%ld, buf_align=%ld,write_align=%ld)",
+//    Debug("log-logbuffer","LogBuffer::LogBuffer(owner,size=%ld, buf_align=%ld,write_align=%ld)",
 //          size,buf_align,write_align);
 
   // create the buffer: size + LB_DEFAULT_ALIGN(512)
@@ -298,7 +298,7 @@ LogBuffer::LogBuffer(LogObject * owner, 
 
   m_expiration_time = LogUtils::timestamp() + Log::config->max_secs_per_buffer;
 
-//    Debug("log2-logbuffer","[%p] Created buffer %u for %s at address %p, size %d",
+//    Debug("log-logbuffer","[%p] Created buffer %u for %s at address %p, size %d",
 //        this_ethread(), m_id, m_owner->get_base_filename(), m_buffer, (int)size);
 }
 
@@ -318,7 +318,7 @@ LogBuffer::LogBuffer(LogObject * owner, 
   // no checkout writes or checkin writes are allowed. This is enforced
   // by the asserts in checkout_write and checkin_write
 
-//    Debug("log2-logbuffer","LogBuffer::LogBuffer(owner,header)");
+//    Debug("log-logbuffer","LogBuffer::LogBuffer(owner,header)");
 
   m_new_buffer = (char *) header;       /* must be deleted inside destructor */
 
@@ -326,7 +326,7 @@ LogBuffer::LogBuffer(LogObject * owner, 
   //
   m_id = (uint32) ink_atomic_increment((pvint32) & M_ID, 1);
 
-//    Debug("log2-logbuffer","[%p] Created buffer %u for %s at address %p",
+//    Debug("log-logbuffer","[%p] Created buffer %u for %s at address %p",
 //        this_ethread(), m_id, m_owner->get_base_filename(), m_buffer);
 }
 
@@ -342,10 +342,10 @@ LogBuffer::~LogBuffer()
       m_new_buffer = 0;
     }
     m_bb = iLogBufferBuffer::Delete_iLogBufferBuffer(m_bb);
-//      Debug("log2-logbuffer", "[%p] Deleted buffer %u", this_ethread(), m_id);
+//      Debug("log-logbuffer", "[%p] Deleted buffer %u", this_ethread(), m_id);
   }
 //    else
-//      Debug("log2-logbuffer", "Incorrect signature 0x%08lX inside LogBuffer::~LogBuffer()", sign);
+//      Debug("log-logbuffer", "Incorrect signature 0x%08lX inside LogBuffer::~LogBuffer()", sign);
 }
 
 /*-------------------------------------------------------------------------
@@ -443,7 +443,7 @@ LogBuffer::LB_ResultCode LogBuffer::chec
     // disable statistics for now
     //ProxyMutex *mutex = this_ethread()->mutex;
     //ink_release_assert(mutex->thread_holding == this_ethread());
-    //SUM_DYN_STAT(log2_stat_bytes_buffered_stat, actual_write_size);
+    //SUM_DYN_STAT(log_stat_bytes_buffered_stat, actual_write_size);
 
     LogEntryHeader *
       entry_header = (LogEntryHeader *) & m_buffer[offset];
@@ -457,7 +457,7 @@ LogBuffer::LB_ResultCode LogBuffer::chec
 
     *write_offset = offset + sizeof(LogEntryHeader);
   }
-//    Debug("log2-logbuffer","[%p] %s for buffer %u (%s) returning %d",
+//    Debug("log-logbuffer","[%p] %s for buffer %u (%s) returning %d",
 //        this_ethread(),
 //        (write_offset ? "checkout_write" : "force_new_buffer"),
 //        m_id, m_owner->get_base_filename(), ret_val);
@@ -497,7 +497,7 @@ LogBuffer::LB_ResultCode LogBuffer::chec
 
   } while (!switch_state(old_s, new_s));
 
-//    Debug("log2-logbuffer","[%p] checkin_write for buffer %u (%s) "
+//    Debug("log-logbuffer","[%p] checkin_write for buffer %u (%s) "
 //        "returning %d (%u writers left)", this_ethread(),
 //        m_id, m_owner->get_base_filename(), ret_val, writers_left);
 
@@ -856,21 +856,21 @@ LogBuffer::to_ascii(LogEntryHeader * ent
 
   for (i = 0; i < fieldlist_cache_entries; i++) {
     if (strcmp(symbol_str, fieldlist_cache[i].symbol_str) == 0) {
-      Debug("log2-fieldlist", "Fieldlist for %s found in cache, #%d", symbol_str, i);
+      Debug("log-fieldlist", "Fieldlist for %s found in cache, #%d", symbol_str, i);
       fieldlist = fieldlist_cache[i].fieldlist;
       break;
     }
   }
 
   if (!fieldlist) {
-    Debug("log2-fieldlist", "Fieldlist for %s not found; creating ...", symbol_str);
+    Debug("log-fieldlist", "Fieldlist for %s not found; creating ...", symbol_str);
     fieldlist = NEW(new LogFieldList);
     ink_assert(fieldlist != NULL);
     bool contains_aggregates = false;
     LogFormat::parse_symbol_string(symbol_str, fieldlist, &contains_aggregates);
 
     if (fieldlist_cache_entries < FIELDLIST_CACHE_SIZE) {
-      Debug("log2-fieldlist", "Fieldlist cached as entry %d", fieldlist_cache_entries);
+      Debug("log-fieldlist", "Fieldlist cached as entry %d", fieldlist_cache_entries);
       fieldlist_cache[fieldlist_cache_entries].fieldlist = fieldlist;
       fieldlist_cache[fieldlist_cache_entries].symbol_str = xstrdup(symbol_str);
       fieldlist_cache_entries++;
@@ -948,7 +948,7 @@ LogBuffer::convert_to_network_order()
 void
 LogBuffer::convert_to_network_order(LogBufferHeader * header)
 {
-  Debug("log2-sock", "Converting buffer to network byte order");
+  Debug("log-sock", "Converting buffer to network byte order");
   ink_assert(header != NULL);
   //
   // First, change each of the entry headers.  Order is important,
@@ -1011,7 +1011,7 @@ LogBuffer::convert_to_host_order()
 void
 LogBuffer::convert_to_host_order(LogBufferHeader * header)
 {
-  Debug("log2-sock", "Converting buffer to host byte order");
+  Debug("log-sock", "Converting buffer to host byte order");
   ink_assert(header != NULL);
 
   header->cookie = ntohl(header->cookie);

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogCollationAccept.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogCollationAccept.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogCollationAccept.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogCollationAccept.cc Tue Nov 30 01:42:55 2010
@@ -47,7 +47,7 @@ m_pending_event(NULL)
   // appended to itself if multiple do_io_reads are called requesting
   // small amounts of data.  Most arguments are default except for the
   // last one which we will set to true.
-  m_accept_action = netProcessor.accept(this, m_port, false, INADDR_ANY, false, NO_FD, ACCEPTEX_POOL_SIZE, true);
+  m_accept_action = netProcessor.accept(this, m_port, AF_INET, false, INADDR_ANY, false, NO_FD, ACCEPTEX_POOL_SIZE, true);
   //m_accept_action = netProcessor.accept(this, m_port);
   ink_assert(NULL != m_accept_action);
 
@@ -60,14 +60,14 @@ m_pending_event(NULL)
 LogCollationAccept::~LogCollationAccept()
 {
 
-  Debug("log2-collation", "LogCollationAccept::~LogCollationAccept");
+  Debug("log-collation", "LogCollationAccept::~LogCollationAccept");
 
   // stop the netProcessor
   if (m_accept_action) {
     m_accept_action->cancel();
     m_accept_action = NULL;
 
-    Debug("log2-collation", "closing Log::collation_accept_file_descriptor "
+    Debug("log-collation", "closing Log::collation_accept_file_descriptor "
           "(%d)", Log::collation_accept_file_descriptor);
     if (::close(Log::collation_accept_file_descriptor) < 0) {
       Error("error closing collate listen file descriptor [%d]: %s",

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogCollationClientSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogCollationClientSM.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogCollationClientSM.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogCollationClientSM.cc Tue Nov 30 01:42:55 2010
@@ -73,7 +73,7 @@ m_pending_event(NULL),
 m_buffer_send_list(NULL), m_buffer_in_iocore(NULL), m_flow(LOG_COLL_FLOW_ALLOW), m_log_host(log_host), m_id(ID++)
 {
 
-  Debug("log2-coll", "[%d]client::constructor", m_id);
+  Debug("log-coll", "[%d]client::constructor", m_id);
 
   ink_assert(m_log_host != NULL);
 
@@ -94,7 +94,7 @@ m_buffer_send_list(NULL), m_buffer_in_io
 LogCollationClientSM::~LogCollationClientSM()
 {
 
-  Debug("log2-coll", "[%d]client::destructor", m_id);
+  Debug("log-coll", "[%d]client::destructor", m_id);
 
   ink_mutex_acquire(&(mutex->the_mutex));
   client_done(LOG_COLL_EVENT_SWITCH, NULL);
@@ -162,17 +162,17 @@ LogCollationClientSM::send(LogBuffer * l
   // take lock (can block on call because we're on our own thread)
   ink_mutex_acquire(&(mutex->the_mutex));
 
-  Debug("log2-coll", "[%d]client::send", m_id);
+  Debug("log-coll", "[%d]client::send", m_id);
 
   // deny if state is DONE or FAIL
   if (m_client_state == LOG_COLL_CLIENT_DONE || m_client_state == LOG_COLL_CLIENT_FAIL) {
-    Debug("log2-coll", "[%d]client::send - DONE/FAIL state; rejecting", m_id);
+    Debug("log-coll", "[%d]client::send - DONE/FAIL state; rejecting", m_id);
     ink_mutex_release(&(mutex->the_mutex));
     return 0;
   }
   // only allow send if m_flow is ALLOW
   if (m_flow == LOG_COLL_FLOW_DENY) {
-    Debug("log2-coll", "[%d]client::send - m_flow = DENY; rejecting", m_id);
+    Debug("log-coll", "[%d]client::send - m_flow = DENY; rejecting", m_id);
     ink_mutex_release(&(mutex->the_mutex));
     return 0;
   }
@@ -180,12 +180,12 @@ LogCollationClientSM::send(LogBuffer * l
   ink_assert(log_buffer != NULL);
   ink_assert(m_buffer_send_list != NULL);
   m_buffer_send_list->add(log_buffer);
-  Debug("log2-coll", "[%d]client::send - new log_buffer to send_list", m_id);
+  Debug("log-coll", "[%d]client::send - new log_buffer to send_list", m_id);
 
   // disable m_flow if there's too much work to do now
   ink_assert(m_flow == LOG_COLL_FLOW_ALLOW);
   if (m_buffer_send_list->get_size() >= Log::config->collation_max_send_buffers) {
-    Debug("log2-coll", "[%d]client::send - m_flow = DENY", m_id);
+    Debug("log-coll", "[%d]client::send - m_flow = DENY", m_id);
     Note("[log-coll] send-queue full; orphaning logs      "
          "[%d.%d.%d.%d:%d]",
          ((unsigned char *) (&(m_log_host->m_ip)))[0],
@@ -232,13 +232,13 @@ int
 LogCollationClientSM::client_auth(int event, VIO * vio)
 {
   NOWARN_UNUSED(vio);
-  Debug("log2-coll", "[%d]client::client_auth", m_id);
+  Debug("log-coll", "[%d]client::client_auth", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
     {
-      Debug("log2-coll", "[%d]client::client_auth - SWITCH", m_id);
+      Debug("log-coll", "[%d]client::client_auth - SWITCH", m_id);
       m_client_state = LOG_COLL_CLIENT_AUTH;
 
       NetMsgHeader nmh;
@@ -251,7 +251,7 @@ LogCollationClientSM::client_auth(int ev
       m_auth_buffer->write(Log::config->collation_secret, bytes_to_send);
       bytes_to_send += sizeof(NetMsgHeader);
 
-      Debug("log2-coll", "[%d]client::client_auth - do_io_write(%d)", m_id, bytes_to_send);
+      Debug("log-coll", "[%d]client::client_auth - do_io_write(%d)", m_id, bytes_to_send);
       ink_assert(m_host_vc != NULL);
       m_host_vio = m_host_vc->do_io_write(this, bytes_to_send, m_auth_reader);
       ink_assert(m_host_vio != NULL);
@@ -260,11 +260,11 @@ LogCollationClientSM::client_auth(int ev
     }
 
   case VC_EVENT_WRITE_READY:
-    Debug("log2-coll", "[%d]client::client_auth - WRITE_READY", m_id);
+    Debug("log-coll", "[%d]client::client_auth - WRITE_READY", m_id);
     return EVENT_CONT;
 
   case VC_EVENT_WRITE_COMPLETE:
-    Debug("log2-coll", "[%d]client::client_auth - WRITE_COMPLETE", m_id);
+    Debug("log-coll", "[%d]client::client_auth - WRITE_COMPLETE", m_id);
 
     Note("[log-coll] host up [%d.%d.%d.%d:%d]",
          ((unsigned char *) (&(m_log_host->m_ip)))[0],
@@ -277,11 +277,11 @@ LogCollationClientSM::client_auth(int ev
   case VC_EVENT_EOS:
   case VC_EVENT_ERROR:
     {
-      Debug("log2-coll", "[%d]client::client_auth - EOS|ERROR", m_id);
+      Debug("log-coll", "[%d]client::client_auth - EOS|ERROR", m_id);
 
       int read_avail = m_auth_reader->read_avail();
       if (read_avail > 0) {
-        Debug("log2-coll", "[%d]client::client_auth - consuming unsent data", m_id);
+        Debug("log-coll", "[%d]client::client_auth - consuming unsent data", m_id);
         m_auth_reader->consume(read_avail);
       }
 
@@ -306,7 +306,7 @@ int
 LogCollationClientSM::client_dns(int event, HostDBInfo * hostdb_info)
 {
 
-  Debug("log2-coll", "[%d]client::client_dns", m_id);
+  Debug("log-coll", "[%d]client::client_dns", m_id);
 
   switch (event) {
 
@@ -347,7 +347,7 @@ int
 LogCollationClientSM::client_done(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]client::client_done", m_id);
+  Debug("log-coll", "[%d]client::client_done", m_id);
 
   switch (event) {
 
@@ -362,7 +362,7 @@ LogCollationClientSM::client_done(int ev
 
     // close connections
     if (m_host_vc) {
-      Debug("log2-coll", "[%d]client::client_done - disconnecting!", m_id);
+      Debug("log-coll", "[%d]client::client_done - disconnecting!", m_id);
       // do I need to delete this???
       m_host_vc->do_io_close(0);
       m_host_vc = 0;
@@ -418,12 +418,12 @@ int
 LogCollationClientSM::client_fail(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]client::client_fail", m_id);
+  Debug("log-coll", "[%d]client::client_fail", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
-    Debug("log2-coll", "[%d]client::client_fail - SWITCH", m_id);
+    Debug("log-coll", "[%d]client::client_fail - SWITCH", m_id);
     m_client_state = LOG_COLL_CLIENT_FAIL;
 
     Note("[log-coll] host down [%d.%d.%d.%d:%d]",
@@ -456,7 +456,7 @@ LogCollationClientSM::client_fail(int ev
     return EVENT_CONT;
 
   case EVENT_INTERVAL:
-    Debug("log2-coll", "[%d]client::client_fail - INTERVAL", m_id);
+    Debug("log-coll", "[%d]client::client_fail - INTERVAL", m_id);
     m_pending_event = NULL;
     return client_open(LOG_COLL_EVENT_SWITCH, NULL);
 
@@ -477,7 +477,7 @@ int
 LogCollationClientSM::client_idle(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]client::client_idle", m_id);
+  Debug("log-coll", "[%d]client::client_idle", m_id);
 
   switch (event) {
 
@@ -487,7 +487,7 @@ LogCollationClientSM::client_idle(int ev
 
   case VC_EVENT_EOS:
   case VC_EVENT_ERROR:
-    Debug("log2-coll", "[%d]client::client_idle - EOS|ERROR", m_id);
+    Debug("log-coll", "[%d]client::client_idle - EOS|ERROR", m_id);
     return client_fail(LOG_COLL_EVENT_SWITCH, NULL);
 
   default:
@@ -507,7 +507,7 @@ int
 LogCollationClientSM::client_init(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]client::client_init", m_id);
+  Debug("log-coll", "[%d]client::client_init", m_id);
 
   switch (event) {
 
@@ -569,13 +569,13 @@ int
 LogCollationClientSM::client_open(int event, NetVConnection * net_vc)
 {
 
-  Debug("log2-coll", "[%d]client::client_open", m_id);
+  Debug("log-coll", "[%d]client::client_open", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
 
-    Debug("log2-coll", "[%d]client::client_open - SWITCH", m_id);
+    Debug("log-coll", "[%d]client::client_open - SWITCH", m_id);
     m_client_state = LOG_COLL_CLIENT_OPEN;
 
     {
@@ -592,7 +592,7 @@ LogCollationClientSM::client_open(int ev
     return EVENT_CONT;
 
   case NET_EVENT_OPEN:
-    Debug("log2-coll", "[%d]client::client_open - %d.%d.%d.%d:%d",
+    Debug("log-coll", "[%d]client::client_open - %d.%d.%d.%d:%d",
           m_id,
           ((unsigned char *) (&(m_log_host->m_ip)))[0],
           ((unsigned char *) (&(m_log_host->m_ip)))[1],
@@ -613,7 +613,7 @@ LogCollationClientSM::client_open(int ev
     return client_auth(LOG_COLL_EVENT_SWITCH, NULL);
 
   case NET_EVENT_OPEN_FAILED:
-    Debug("log2-coll", "[%d]client::client_open - OPEN_FAILED", m_id);
+    Debug("log-coll", "[%d]client::client_open - OPEN_FAILED", m_id);
     // callback complete, reset m_pending_pending action
     m_pending_action = NULL;
     return client_fail(LOG_COLL_EVENT_SWITCH, NULL);
@@ -635,12 +635,12 @@ int
 LogCollationClientSM::client_send(int event, VIO * vio)
 {
   NOWARN_UNUSED(vio);
-  Debug("log2-coll", "[%d]client::client_send", m_id);
+  Debug("log-coll", "[%d]client::client_send", m_id);
 
   switch (event) {
 
   case EVENT_IMMEDIATE:
-    Debug("log2-coll", "[%d]client::client_send - EVENT_IMMEDIATE", m_id);
+    Debug("log-coll", "[%d]client::client_send - EVENT_IMMEDIATE", m_id);
     // callback complete, reset m_pending_event
     m_pending_event = NULL;
 
@@ -648,7 +648,7 @@ LogCollationClientSM::client_send(int ev
 
   case LOG_COLL_EVENT_SWITCH:
     {
-      Debug("log2-coll", "[%d]client::client_send - SWITCH", m_id);
+      Debug("log-coll", "[%d]client::client_send - SWITCH", m_id);
       m_client_state = LOG_COLL_CLIENT_SEND;
 
       // get a buffer off our queue
@@ -657,12 +657,12 @@ LogCollationClientSM::client_send(int ev
       if ((m_buffer_in_iocore = m_buffer_send_list->get()) == NULL) {
         return client_idle(LOG_COLL_EVENT_SWITCH, NULL);
       }
-      Debug("log2-coll", "[%d]client::client_send - send_list to m_buffer_in_iocore", m_id);
-      Debug("log2-coll", "[%d]client::client_send - send_list_size(%d)", m_id, m_buffer_send_list->get_size());
+      Debug("log-coll", "[%d]client::client_send - send_list to m_buffer_in_iocore", m_id);
+      Debug("log-coll", "[%d]client::client_send - send_list_size(%d)", m_id, m_buffer_send_list->get_size());
 
       // enable m_flow if we're out of work to do
       if (m_flow == LOG_COLL_FLOW_DENY && m_buffer_send_list->get_size() == 0) {
-        Debug("log2-coll", "[%d]client::client_send - m_flow = ALLOW", m_id);
+        Debug("log-coll", "[%d]client::client_send - m_flow = ALLOW", m_id);
         Note("[log-coll] send-queue clear; resuming collation "
              "[%d.%d.%d.%d:%d]",
              ((unsigned char *) (&(m_log_host->m_ip)))[0],
@@ -677,7 +677,7 @@ LogCollationClientSM::client_send(int ev
       // write the lame way.
 
 #if defined(LOG_BUFFER_TRACKING)
-      Debug("log2-buftrak", "[%d]client::client_send - network write begin", m_buffer_in_iocore->header()->id);
+      Debug("log-buftrak", "[%d]client::client_send - network write begin", m_buffer_in_iocore->header()->id);
 #endif // defined(LOG_BUFFER_TRACKING)
 
       // prepare to send data
@@ -696,7 +696,7 @@ LogCollationClientSM::client_send(int ev
       bytes_to_send += sizeof(NetMsgHeader);
 
       // send m_send_buffer to iocore
-      Debug("log2-coll", "[%d]client::client_send - do_io_write(%d)", m_id, bytes_to_send);
+      Debug("log-coll", "[%d]client::client_send - do_io_write(%d)", m_id, bytes_to_send);
       ink_assert(m_host_vc != NULL);
       m_host_vio = m_host_vc->do_io_write(this, bytes_to_send, m_send_reader);
       ink_assert(m_host_vio != NULL);
@@ -704,21 +704,21 @@ LogCollationClientSM::client_send(int ev
     return EVENT_CONT;
 
   case VC_EVENT_WRITE_READY:
-    Debug("log2-coll", "[%d]client::client_send - WRITE_READY", m_id);
+    Debug("log-coll", "[%d]client::client_send - WRITE_READY", m_id);
     return EVENT_CONT;
 
   case VC_EVENT_WRITE_COMPLETE:
-    Debug("log2-coll", "[%d]client::client_send - WRITE_COMPLETE", m_id);
+    Debug("log-coll", "[%d]client::client_send - WRITE_COMPLETE", m_id);
 
     ink_assert(m_buffer_in_iocore != NULL);
 #if defined(LOG_BUFFER_TRACKING)
-    Debug("log2-buftrak", "[%d]client::client_send - network write complete", m_buffer_in_iocore->header()->id);
+    Debug("log-buftrak", "[%d]client::client_send - network write complete", m_buffer_in_iocore->header()->id);
 #endif // defined(LOG_BUFFER_TRACKING)
 
     // done with the buffer, delete it
     delete m_buffer_in_iocore;
     m_buffer_in_iocore = NULL;
-    Debug("log2-coll", "[%d]client::client_send - m_buffer_in_iocore to delete_list", m_id);
+    Debug("log-coll", "[%d]client::client_send - m_buffer_in_iocore to delete_list", m_id);
 
     // switch back to client_send
     return client_send(LOG_COLL_EVENT_SWITCH, NULL);
@@ -726,11 +726,11 @@ LogCollationClientSM::client_send(int ev
   case VC_EVENT_EOS:
   case VC_EVENT_ERROR:
     {
-      Debug("log2-coll", "[%d]client::client_send - EOS|ERROR", m_id);
+      Debug("log-coll", "[%d]client::client_send - EOS|ERROR", m_id);
 
       int read_avail = m_send_reader->read_avail();
       if (read_avail > 0) {
-        Debug("log2-coll", "[%d]client::client_send - consuming unsent data", m_id);
+        Debug("log-coll", "[%d]client::client_send - consuming unsent data", m_id);
         m_send_reader->consume(read_avail);
       }
 
@@ -738,7 +738,7 @@ LogCollationClientSM::client_send(int ev
     }
 
   default:
-    Debug("log2-coll", "[%d]client::client_send - default", m_id);
+    Debug("log-coll", "[%d]client::client_send - default", m_id);
     return client_fail(LOG_COLL_EVENT_SWITCH, NULL);
 
   }
@@ -762,11 +762,11 @@ void
 LogCollationClientSM::flush_to_orphan()
 {
 
-  Debug("log2-coll", "[%d]client::flush_to_orphan", m_id);
+  Debug("log-coll", "[%d]client::flush_to_orphan", m_id);
 
   // if in middle of a write, flush buffer_in_iocore to orphan
   if (m_buffer_in_iocore != NULL) {
-    Debug("log2-coll", "[%d]client::flush_to_orphan - m_buffer_in_iocore to oprhan", m_id);
+    Debug("log-coll", "[%d]client::flush_to_orphan - m_buffer_in_iocore to oprhan", m_id);
     m_buffer_in_iocore->convert_to_host_order();
     m_log_host->orphan_write_and_delete(m_buffer_in_iocore);
     m_buffer_in_iocore = NULL;
@@ -775,7 +775,7 @@ LogCollationClientSM::flush_to_orphan()
   LogBuffer *log_buffer;
   ink_assert(m_buffer_send_list != NULL);
   while ((log_buffer = m_buffer_send_list->get()) != NULL) {
-    Debug("log2-coll", "[%d]client::flush_to_orphan - send_list to orphan", m_id);
+    Debug("log-coll", "[%d]client::flush_to_orphan - send_list to orphan", m_id);
     m_log_host->orphan_write_and_delete(log_buffer);
   }
 

Modified: trafficserver/traffic/branches/wccp/proxy/logging/LogCollationHostSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/proxy/logging/LogCollationHostSM.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/proxy/logging/LogCollationHostSM.cc (original)
+++ trafficserver/traffic/branches/wccp/proxy/logging/LogCollationHostSM.cc Tue Nov 30 01:42:55 2010
@@ -70,7 +70,7 @@ m_pending_event(NULL),
 m_read_buffer(NULL), m_read_bytes_wanted(0), m_read_bytes_received(0), m_client_ip(0), m_client_port(0), m_id(ID++)
 {
 
-  Debug("log2-coll", "[%d]host::constructor", m_id);
+  Debug("log-coll", "[%d]host::constructor", m_id);
 
   ink_assert(m_client_vc != NULL);
 
@@ -156,17 +156,17 @@ int
 LogCollationHostSM::host_auth(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]host::host_auth", m_id);
+  Debug("log-coll", "[%d]host::host_auth", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
-    Debug("log2-coll", "[%d]host::host_auth - SWITCH", m_id);
+    Debug("log-coll", "[%d]host::host_auth - SWITCH", m_id);
     m_host_state = LOG_COLL_HOST_AUTH;
     return read_start();
 
   case LOG_COLL_EVENT_READ_COMPLETE:
-    Debug("log2-coll", "[%d]host::host_auth - READ_COMPLETE", m_id);
+    Debug("log-coll", "[%d]host::host_auth - READ_COMPLETE", m_id);
     {
       // compare authorization secrets
       ink_assert(m_read_buffer != NULL);
@@ -175,10 +175,10 @@ LogCollationHostSM::host_auth(int event,
       delete[]m_read_buffer;
       m_read_buffer = 0;
       if (!diff) {
-        Debug("log2-coll", "[%d]host::host_auth - authenticated!", m_id);
+        Debug("log-coll", "[%d]host::host_auth - authenticated!", m_id);
         return host_recv(LOG_COLL_EVENT_SWITCH, NULL);
       } else {
-        Debug("log2-coll", "[%d]host::host_auth - authenticated failed!", m_id);
+        Debug("log-coll", "[%d]host::host_auth - authenticated failed!", m_id);
         Note("[log-coll] authentication failed [%d.%d.%d.%d:%d]",
              ((unsigned char *) (&m_client_ip))[0],
              ((unsigned char *) (&m_client_ip))[1],
@@ -189,7 +189,7 @@ LogCollationHostSM::host_auth(int event,
     }
 
   case LOG_COLL_EVENT_ERROR:
-    Debug("log2-coll", "[%d]host::host_auth - ERROR", m_id);
+    Debug("log-coll", "[%d]host::host_auth - ERROR", m_id);
     return host_done(LOG_COLL_EVENT_SWITCH, NULL);
 
   default:
@@ -210,11 +210,11 @@ LogCollationHostSM::host_done(int event,
 {
   NOWARN_UNUSED(event);
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]host::host_done", m_id);
+  Debug("log-coll", "[%d]host::host_done", m_id);
 
   // close connections
   if (m_client_vc) {
-    Debug("log2-coll", "[%d]host::host_done - disconnecting!", m_id);
+    Debug("log-coll", "[%d]host::host_done - disconnecting!", m_id);
     m_client_vc->do_io_close();
     m_client_vc = 0;
     Note("[log-coll] client disconnected [%d.%d.%d.%d:%d]",
@@ -244,7 +244,7 @@ int
 LogCollationHostSM::host_init(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]host::host_init", m_id);
+  Debug("log-coll", "[%d]host::host_init", m_id);
 
   switch (event) {
 
@@ -278,17 +278,17 @@ int
 LogCollationHostSM::host_recv(int event, void *data)
 {
   NOWARN_UNUSED(data);
-  Debug("log2-coll", "[%d]host::host_recv", m_id);
+  Debug("log-coll", "[%d]host::host_recv", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
-    Debug("log2-coll", "[%d]host::host_recv - SWITCH", m_id);
+    Debug("log-coll", "[%d]host::host_recv - SWITCH", m_id);
     m_host_state = LOG_COLL_HOST_RECV;
     return read_start();
 
   case LOG_COLL_EVENT_READ_COMPLETE:
-    Debug("log2-coll", "[%d]host::host_recv - READ_COMPLETE", m_id);
+    Debug("log-coll", "[%d]host::host_recv - READ_COMPLETE", m_id);
     {
       // grab the log_buffer
       LogBufferHeader *log_buffer_header;
@@ -317,7 +317,7 @@ LogCollationHostSM::host_recv(int event,
           log_object = Log::global_scrap_object;
         }
         log_format = log_object->m_format;
-        Debug("log2-coll", "[%d]host::host_recv - using format '%s'", m_id, log_format->name());
+        Debug("log-coll", "[%d]host::host_recv - using format '%s'", m_id, log_format->name());
 
         // make a new LogBuffer (log_buffer_header plus subsequent
         // buffer already converted to host order) and add it to the
@@ -332,7 +332,7 @@ LogCollationHostSM::host_recv(int event,
       }
 
 #if defined(LOG_BUFFER_TRACKING)
-      Debug("log2-buftrak", "[%d]host::host_recv - network read complete", log_buffer_header->id);
+      Debug("log-buftrak", "[%d]host::host_recv - network read complete", log_buffer_header->id);
 #endif // defined(LOG_BUFFER_TRACKING)
 
       // get ready for next read (memory may not be freed!!!)
@@ -343,7 +343,7 @@ LogCollationHostSM::host_recv(int event,
     }
 
   case LOG_COLL_EVENT_ERROR:
-    Debug("log2-coll", "[%d]host::host_recv - ERROR", m_id);
+    Debug("log-coll", "[%d]host::host_recv - ERROR", m_id);
     return host_done(LOG_COLL_EVENT_SWITCH, NULL);
 
   default:
@@ -371,7 +371,7 @@ int
 LogCollationHostSM::read_start()
 {
 
-  Debug("log2-coll", "[%d]host::read_start", m_id);
+  Debug("log-coll", "[%d]host::read_start", m_id);
 
   SET_HANDLER((LogCollationHostSMHandler) & LogCollationHostSM::read_handler);
   if (m_read_buffer) {
@@ -390,45 +390,45 @@ int
 LogCollationHostSM::read_hdr(int event, VIO * vio)
 {
 
-  Debug("log2-coll", "[%d]host::read_hdr", m_id);
+  Debug("log-coll", "[%d]host::read_hdr", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
-    Debug("log2-coll", "[%d]host:read_hdr - SWITCH", m_id);
+    Debug("log-coll", "[%d]host:read_hdr - SWITCH", m_id);
     m_read_state = LOG_COLL_READ_HDR;
 
     m_read_bytes_wanted = sizeof(NetMsgHeader);
     m_read_bytes_received = 0;
     m_read_buffer = (char *) &m_net_msg_header;
     ink_assert(m_client_vc != NULL);
-    Debug("log2-coll", "[%d]host:read_hdr - do_io_read(%d)", m_id, m_read_bytes_wanted);
+    Debug("log-coll", "[%d]host:read_hdr - do_io_read(%d)", m_id, m_read_bytes_wanted);
     m_client_vio = m_client_vc->do_io_read(this, m_read_bytes_wanted, m_client_buffer);
     ink_assert(m_client_vio != NULL);
     return EVENT_CONT;
 
   case VC_EVENT_IMMEDIATE:
-    Debug("log2-coll", "[%d]host::read_hdr - IMMEDIATE", m_id);
+    Debug("log-coll", "[%d]host::read_hdr - IMMEDIATE", m_id);
     return EVENT_CONT;
 
   case VC_EVENT_READ_READY:
-    Debug("log2-coll", "[%d]host::read_hdr - READ_READY", m_id);
+    Debug("log-coll", "[%d]host::read_hdr - READ_READY", m_id);
     read_partial(vio);
     return EVENT_CONT;
 
   case VC_EVENT_READ_COMPLETE:
-    Debug("log2-coll", "[%d]host::read_hdr - READ_COMPLETE", m_id);
+    Debug("log-coll", "[%d]host::read_hdr - READ_COMPLETE", m_id);
     read_partial(vio);
     ink_assert(m_read_bytes_wanted == m_read_bytes_received);
     return read_body(LOG_COLL_EVENT_SWITCH, NULL);
 
   case VC_EVENT_EOS:
   case VC_EVENT_ERROR:
-    Debug("log2-coll", "[%d]host::read_hdr - EOS|ERROR", m_id);
+    Debug("log-coll", "[%d]host::read_hdr - EOS|ERROR", m_id);
     return read_done(LOG_COLL_EVENT_ERROR, NULL);
 
   default:
-    Debug("log2-coll", "[%d]host::read_hdr - default %d", m_id, event);
+    Debug("log-coll", "[%d]host::read_hdr - default %d", m_id, event);
     return read_done(LOG_COLL_EVENT_ERROR, NULL);
 
   }
@@ -444,12 +444,12 @@ int
 LogCollationHostSM::read_body(int event, VIO * vio)
 {
 
-  Debug("log2-coll", "[%d]host::read_body", m_id);
+  Debug("log-coll", "[%d]host::read_body", m_id);
 
   switch (event) {
 
   case LOG_COLL_EVENT_SWITCH:
-    Debug("log2-coll", "[%d]host:read_body - SWITCH", m_id);
+    Debug("log-coll", "[%d]host:read_body - SWITCH", m_id);
     m_read_state = LOG_COLL_READ_BODY;
 
     m_read_bytes_wanted = ntohl(m_net_msg_header.htonl_size);
@@ -458,33 +458,33 @@ LogCollationHostSM::read_body(int event,
     m_read_buffer = new char[m_read_bytes_wanted];
     ink_assert(m_read_buffer != NULL);
     ink_assert(m_client_vc != NULL);
-    Debug("log2-coll", "[%d]host:read_body - do_io_read(%d)", m_id, m_read_bytes_wanted);
+    Debug("log-coll", "[%d]host:read_body - do_io_read(%d)", m_id, m_read_bytes_wanted);
     m_client_vio = m_client_vc->do_io_read(this, m_read_bytes_wanted, m_client_buffer);
     ink_assert(m_client_vio != NULL);
     return EVENT_CONT;
 
   case VC_EVENT_IMMEDIATE:
-    Debug("log2-coll", "[%d]host::read_body - IMMEDIATE", m_id);
+    Debug("log-coll", "[%d]host::read_body - IMMEDIATE", m_id);
     return EVENT_CONT;
 
   case VC_EVENT_READ_READY:
-    Debug("log2-coll", "[%d]host::read_body - READ_READY", m_id);
+    Debug("log-coll", "[%d]host::read_body - READ_READY", m_id);
     read_partial(vio);
     return EVENT_CONT;
 
   case VC_EVENT_READ_COMPLETE:
-    Debug("log2-coll", "[%d]host::read_body - READ_COMPLETE", m_id);
+    Debug("log-coll", "[%d]host::read_body - READ_COMPLETE", m_id);
     read_partial(vio);
     ink_assert(m_read_bytes_wanted == m_read_bytes_received);
     return read_done(LOG_COLL_EVENT_READ_COMPLETE, NULL);
 
   case VC_EVENT_EOS:
   case VC_EVENT_ERROR:
-    Debug("log2-coll", "[%d]host::read_body - EOS|ERROR", m_id);
+    Debug("log-coll", "[%d]host::read_body - EOS|ERROR", m_id);
     return read_done(LOG_COLL_EVENT_ERROR, NULL);
 
   default:
-    Debug("log2-coll", "[%d]host::read_body - default %d", m_id, event);
+    Debug("log-coll", "[%d]host::read_body - default %d", m_id, event);
     return read_done(LOG_COLL_EVENT_ERROR, NULL);
 
   }
@@ -526,6 +526,6 @@ LogCollationHostSM::read_partial(VIO * v
   m_read_bytes_received += bytes_received_now;
 
   // stats
-  LOG_SUM_DYN_STAT(log2_stat_bytes_received_from_network_stat, bytes_received_now);
+  LOG_SUM_DYN_STAT(log_stat_bytes_received_from_network_stat, bytes_received_now);
 
 }