You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2010/11/24 17:18:45 UTC
svn commit: r1038671 [1/3] - in /trafficserver/traffic/trunk: contrib/
contrib/perl/AdminClient/lib/Apache/TS/ proxy/ proxy/config/ proxy/logging/
proxy/mgmt2/ proxy/mgmt2/cli/ proxy/mgmt2/cli2/ proxy/mgmt2/cop/
proxy/mgmt2/web2/ test/deft/ test/plugin...
Author: zwoop
Date: Wed Nov 24 16:18:44 2010
New Revision: 1038671
URL: http://svn.apache.org/viewvc?rev=1038671&view=rev
Log:
TS-555 Rename all log2 configs / stats to log.
Modified:
trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm
trafficserver/traffic/trunk/contrib/set_trafficserver.sh
trafficserver/traffic/trunk/proxy/DiagsConfig.cc
trafficserver/traffic/trunk/proxy/Initialize.cc
trafficserver/traffic/trunk/proxy/InkAPITest.cc
trafficserver/traffic/trunk/proxy/InkXml.cc
trafficserver/traffic/trunk/proxy/Main.cc
trafficserver/traffic/trunk/proxy/config/logs_xml.config
trafficserver/traffic/trunk/proxy/logging/Log.cc
trafficserver/traffic/trunk/proxy/logging/LogAccess.cc
trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc
trafficserver/traffic/trunk/proxy/logging/LogCollationAccept.cc
trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc
trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc
trafficserver/traffic/trunk/proxy/logging/LogConfig.cc
trafficserver/traffic/trunk/proxy/logging/LogConfig.h
trafficserver/traffic/trunk/proxy/logging/LogField.cc
trafficserver/traffic/trunk/proxy/logging/LogFile.cc
trafficserver/traffic/trunk/proxy/logging/LogFilter.cc
trafficserver/traffic/trunk/proxy/logging/LogFormat.cc
trafficserver/traffic/trunk/proxy/logging/LogHost.cc
trafficserver/traffic/trunk/proxy/logging/LogObject.cc
trafficserver/traffic/trunk/proxy/logging/LogObject.h
trafficserver/traffic/trunk/proxy/logging/LogSock.cc
trafficserver/traffic/trunk/proxy/mgmt2/Main.cc
trafficserver/traffic/trunk/proxy/mgmt2/RecordsConfig.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli/CLImonitor.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli2/ConfigCmd.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli2/ShowCmd.cc
trafficserver/traffic/trunk/proxy/mgmt2/cli2/cli_detailed_command_list.txt
trafficserver/traffic/trunk/proxy/mgmt2/cop/TrafficCop.cc
trafficserver/traffic/trunk/proxy/mgmt2/uistats
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpLog.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebHttpRender.cc
trafficserver/traffic/trunk/proxy/mgmt2/web2/WebIntrMain.cc
trafficserver/traffic/trunk/test/deft/ts-instantiate.pl
trafficserver/traffic/trunk/test/plugin/test-mgmt/test-mgmt.c
Modified: trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm (original)
+++ trafficserver/traffic/trunk/contrib/perl/AdminClient/lib/Apache/TS/AdminClient.pm Wed Nov 24 16:18:44 2010
@@ -497,63 +497,63 @@ The Apache Traffic Server Administration
proxy.config.lm.pserver_timeout_secs
proxy.config.lm.sem_id
proxy.config.local_state_dir
- proxy.config.log2.ascii_buffer_size
- proxy.config.log2.auto_delete_rolled_files
- proxy.config.log2.collation_host
- proxy.config.log2.collation_host_tagged
- proxy.config.log2.collation_max_send_buffers
- proxy.config.log2.collation_port
- proxy.config.log2.collation_retry_sec
- proxy.config.log2.collation_secret
- proxy.config.log2.common_log_enabled
- proxy.config.log2.common_log_header
- proxy.config.log2.common_log_is_ascii
- proxy.config.log2.common_log_name
- proxy.config.log2.config_file
- proxy.config.log2.custom_logs_enabled
- proxy.config.log2.extended2_log_enabled
- proxy.config.log2.extended2_log_header
- proxy.config.log2.extended2_log_is_ascii
- proxy.config.log2.extended2_log_name
- proxy.config.log2.extended_log_enabled
- proxy.config.log2.extended_log_header
- proxy.config.log2.extended_log_is_ascii
- proxy.config.log2.extended_log_name
- proxy.config.log2.file_stat_frequency
- proxy.config.log2.hostname
- proxy.config.log2.hosts_config_file
- proxy.config.log2.log_buffer_size
- proxy.config.log2.logfile_dir
- proxy.config.log2.logfile_perm
- proxy.config.log2.logging_enabled
- proxy.config.log2.max_entries_per_buffer
- proxy.config.log2.max_line_size
- proxy.config.log2.max_secs_per_buffer
- proxy.config.log2.max_space_mb_for_logs
- proxy.config.log2.max_space_mb_for_orphan_logs
- proxy.config.log2.max_space_mb_headroom
- proxy.config.log2.overspill_report_count
- proxy.config.log2.rolling_enabled
- proxy.config.log2.rolling_interval_sec
- proxy.config.log2.rolling_offset_hr
- proxy.config.log2.rolling_size_mb
- proxy.config.log2.sampling_frequency
- proxy.config.log2.search_log_enabled
- proxy.config.log2.search_log_filters
- proxy.config.log2.search_rolling_interval_sec
- proxy.config.log2.search_server_ip_addr
- proxy.config.log2.search_server_port
- proxy.config.log2.search_top_sites
- proxy.config.log2.search_url_filter
- proxy.config.log2.separate_host_logs
- proxy.config.log2.separate_icp_logs
- proxy.config.log2.space_used_frequency
- proxy.config.log2.squid_log_enabled
- proxy.config.log2.squid_log_header
- proxy.config.log2.squid_log_is_ascii
- proxy.config.log2.squid_log_name
- proxy.config.log2.xml_config_file
- proxy.config.log2.xml_logs_config
+ proxy.config.log.ascii_buffer_size
+ proxy.config.log.auto_delete_rolled_files
+ proxy.config.log.collation_host
+ proxy.config.log.collation_host_tagged
+ proxy.config.log.collation_max_send_buffers
+ proxy.config.log.collation_port
+ proxy.config.log.collation_retry_sec
+ proxy.config.log.collation_secret
+ proxy.config.log.common_log_enabled
+ proxy.config.log.common_log_header
+ proxy.config.log.common_log_is_ascii
+ proxy.config.log.common_log_name
+ proxy.config.log.config_file
+ proxy.config.log.custom_logs_enabled
+ proxy.config.log.extended2_log_enabled
+ proxy.config.log.extended2_log_header
+ proxy.config.log.extended2_log_is_ascii
+ proxy.config.log.extended2_log_name
+ proxy.config.log.extended_log_enabled
+ proxy.config.log.extended_log_header
+ proxy.config.log.extended_log_is_ascii
+ proxy.config.log.extended_log_name
+ proxy.config.log.file_stat_frequency
+ proxy.config.log.hostname
+ proxy.config.log.hosts_config_file
+ proxy.config.log.log_buffer_size
+ proxy.config.log.logfile_dir
+ proxy.config.log.logfile_perm
+ proxy.config.log.logging_enabled
+ proxy.config.log.max_entries_per_buffer
+ proxy.config.log.max_line_size
+ proxy.config.log.max_secs_per_buffer
+ proxy.config.log.max_space_mb_for_logs
+ proxy.config.log.max_space_mb_for_orphan_logs
+ proxy.config.log.max_space_mb_headroom
+ proxy.config.log.overspill_report_count
+ proxy.config.log.rolling_enabled
+ proxy.config.log.rolling_interval_sec
+ proxy.config.log.rolling_offset_hr
+ proxy.config.log.rolling_size_mb
+ proxy.config.log.sampling_frequency
+ proxy.config.log.search_log_enabled
+ proxy.config.log.search_log_filters
+ proxy.config.log.search_rolling_interval_sec
+ proxy.config.log.search_server_ip_addr
+ proxy.config.log.search_server_port
+ proxy.config.log.search_top_sites
+ proxy.config.log.search_url_filter
+ proxy.config.log.separate_host_logs
+ proxy.config.log.separate_icp_logs
+ proxy.config.log.space_used_frequency
+ proxy.config.log.squid_log_enabled
+ proxy.config.log.squid_log_header
+ proxy.config.log.squid_log_is_ascii
+ proxy.config.log.squid_log_name
+ proxy.config.log.xml_config_file
+ proxy.config.log.xml_logs_config
proxy.config.manager_binary
proxy.config.manager_name
proxy.config.net.accept_throttle
Modified: trafficserver/traffic/trunk/contrib/set_trafficserver.sh
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/contrib/set_trafficserver.sh?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/contrib/set_trafficserver.sh (original)
+++ trafficserver/traffic/trunk/contrib/set_trafficserver.sh Wed Nov 24 16:18:44 2010
@@ -46,7 +46,7 @@ function recordsConfig() {
traffic_line -s proxy.config.exec_thread.autoconfig.scale -v 1.000000
traffic_line -s proxy.config.accept_threads -v 1
- traffic_line -s proxy.config.log2.logging_enabled -v 0
+ traffic_line -s proxy.config.log.logging_enabled -v 0
traffic_line -s proxy.config.http.server_port -v 8080
traffic_line -s proxy.config.url_remap.pristine_host_hdr -v 1
Modified: trafficserver/traffic/trunk/proxy/DiagsConfig.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/DiagsConfig.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/DiagsConfig.cc (original)
+++ trafficserver/traffic/trunk/proxy/DiagsConfig.cc Wed Nov 24 16:18:44 2010
@@ -317,13 +317,13 @@ DiagsConfig::DiagsConfig(char *bdt, char
////////////////////////
if (access(system_log_dir, R_OK) == -1) {
- REC_ReadConfigString(diags_logpath, "proxy.config.log2.logfile_dir", PATH_NAME_MAX);
+ REC_ReadConfigString(diags_logpath, "proxy.config.log.logfile_dir", PATH_NAME_MAX);
Layout::get()->relative(system_log_dir, PATH_NAME_MAX, diags_logpath);
if (access(system_log_dir, R_OK) == -1) {
fprintf(stderr,"unable to access() log dir'%s': %d, %s\n",
system_log_dir, errno, strerror(errno));
- fprintf(stderr,"please set 'proxy.config.log2.logfile_dir'\n");
+ fprintf(stderr,"please set 'proxy.config.log.logfile_dir'\n");
_exit(1);
}
}
Modified: trafficserver/traffic/trunk/proxy/Initialize.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Initialize.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Initialize.cc (original)
+++ trafficserver/traffic/trunk/proxy/Initialize.cc Wed Nov 24 16:18:44 2010
@@ -137,7 +137,7 @@ init_system_dirs(void)
if ((err = stat(system_log_dir, &s)) < 0) {
fprintf(stderr,"unable to stat() log dir'%s': %d %d, %s\n",
system_log_dir, err, errno, strerror(errno));
- fprintf(stderr,"please set 'proxy.config.log2.logfile_dir'\n");
+ fprintf(stderr,"please set 'proxy.config.log.logfile_dir'\n");
_exit(1);
}
}
Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Wed Nov 24 16:18:44 2010
@@ -6281,7 +6281,7 @@ REGRESSION_TEST(SDK_API_TSTextLog) (Regr
/* Generate a random log file name, so if we run the test several times, we won't use the
same log file name. */
- char *tmp = REC_ConfigReadString("proxy.config.log2.logfile_dir");
+ char *tmp = REC_ConfigReadString("proxy.config.log.logfile_dir");
snprintf(logname, sizeof(logname), "RegressionTestLog%d.log", (int) getpid());
snprintf(fullpath_logname, sizeof(fullpath_logname), "%s/%s", tmp, logname);
// xfree(tmp);
Modified: trafficserver/traffic/trunk/proxy/InkXml.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkXml.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkXml.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkXml.cc Wed Nov 24 16:18:44 2010
@@ -165,14 +165,14 @@ int
InkXmlConfigFile::parse(int fd)
{
ink_assert(fd >= 0);
- Debug("log2", "Parsing XML config info from memory..");
+ Debug("log", "Parsing XML config info from memory..");
m_line = 1;
m_col = 0;
InkXmlObject *obj;
while ((obj = get_next_xml_object(fd)) != NULL) {
- Debug("log2", "Adding XML object <%s>", obj->object_name());
+ Debug("log", "Adding XML object <%s>", obj->object_name());
add_object(obj);
}
Modified: trafficserver/traffic/trunk/proxy/Main.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Main.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Main.cc (original)
+++ trafficserver/traffic/trunk/proxy/Main.cc Wed Nov 24 16:18:44 2010
@@ -443,12 +443,12 @@ init_dirs(void)
}
if (access(system_log_dir, W_OK) == -1) {
- REC_ReadConfigString(buf, "proxy.config.log2.logfile_dir", PATH_NAME_MAX);
+ REC_ReadConfigString(buf, "proxy.config.log.logfile_dir", PATH_NAME_MAX);
Layout::get()->relative(system_log_dir, PATH_NAME_MAX, buf);
if (access(system_log_dir, W_OK) == -1) {
fprintf(stderr,"unable to access() log dir'%s':%d, %s\n",
system_log_dir, errno, strerror(errno));
- fprintf(stderr,"please set 'proxy.config.log2.logfile_dir'\n");
+ fprintf(stderr,"please set 'proxy.config.log.logfile_dir'\n");
_exit(1);
}
}
Modified: trafficserver/traffic/trunk/proxy/config/logs_xml.config
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/config/logs_xml.config?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/config/logs_xml.config (original)
+++ trafficserver/traffic/trunk/proxy/config/logs_xml.config Wed Nov 24 16:18:44 2010
@@ -355,7 +355,7 @@ squid Log Format with seconds resolution
The following <LogFormat> is the squid format but with a seconds-only
timestamp (cqts) instead of a seconds and milliseconds timestamp
(cqtq). The default squid format (enabled by setting the
-configuration variable proxy.records.log2.squid_log_enabled or through
+configuration variable proxy.records.log.squid_log_enabled or through
the GUI) used to generate seconds-only timestamps. Starting in Traffic
Server 5.2, it generates millisecond resolution timestamps that are
compliant with the format of the squid cache.
Modified: trafficserver/traffic/trunk/proxy/logging/Log.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/Log.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/Log.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/Log.cc Wed Nov 24 16:18:44 2010
@@ -111,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);
@@ -121,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);
@@ -136,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
@@ -197,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;
}
@@ -230,7 +230,7 @@ Log::periodic_tasks(long time_now)
change_configuration();
} else if (logging_mode > LOG_NOTHING || config->collation_mode == LogConfig::COLLATION_HOST ||
config->has_api_objects()) {
- Debug("log2-periodic", "Performing periodic tasks");
+ Debug("log-periodic", "Performing periodic tasks");
// Check if space is ok and update the space used
//
@@ -957,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;
}
@@ -994,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();
@@ -1004,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;
}
@@ -1018,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
@@ -1027,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);
}
}
}
@@ -1087,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();
}
}
@@ -1156,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;
}
@@ -1206,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;
@@ -1223,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;
@@ -1243,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;
@@ -1258,10 +1257,10 @@ 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??
@@ -1269,7 +1268,7 @@ Log::flush_thread_main(void *args)
now = time(NULL);
if (now > last_time) {
if ((now % PERIODIC_TASKS_INTERVAL) == 0) {
- Debug("log2-flush", "periodic tasks for %ld", now);
+ Debug("log-flush", "periodic tasks for %ld", now);
periodic_tasks(now);
}
last_time = (now = time(NULL));
@@ -1316,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);
@@ -1333,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);
@@ -1356,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);
@@ -1374,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;
}
@@ -1389,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) {
@@ -1399,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;
@@ -1412,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/trunk/proxy/logging/LogAccess.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogAccess.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogAccess.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogAccess.cc Wed Nov 24 16:18:44 2010
@@ -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/trunk/proxy/logging/LogBuffer.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogBuffer.cc Wed Nov 24 16:18:44 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/trunk/proxy/logging/LogCollationAccept.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogCollationAccept.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogCollationAccept.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogCollationAccept.cc Wed Nov 24 16:18:44 2010
@@ -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/trunk/proxy/logging/LogCollationClientSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogCollationClientSM.cc Wed Nov 24 16:18:44 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/trunk/proxy/logging/LogCollationHostSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc?rev=1038671&r1=1038670&r2=1038671&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc (original)
+++ trafficserver/traffic/trunk/proxy/logging/LogCollationHostSM.cc Wed Nov 24 16:18:44 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);
}