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 2018/05/23 22:32:37 UTC
[trafficserver] branch master updated: Removes the remaining
vestiges of log_hosts.config
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 6afba02 Removes the remaining vestiges of log_hosts.config
6afba02 is described below
commit 6afba02a9fa5207c3cb22d83c49c3b810d41aabd
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Tue May 22 15:54:33 2018 -0700
Removes the remaining vestiges of log_hosts.config
---
cmd/traffic_manager/AddConfigFilesHere.cc | 1 -
cmd/traffic_manager/traffic_manager.cc | 3 -
doc/.tx/config | 5 --
doc/admin-guide/files/index.en.rst | 4 -
doc/admin-guide/files/log_hosts.config.en.rst | 66 ----------------
doc/admin-guide/logging/examples.en.rst | 27 -------
.../admin-guide/files/log_hosts.config.en.po | 88 ----------------------
.../monitoring/logging/managing-logs.en.po | 27 -------
doc/manpages.py | 1 -
lib/perl/lib/Apache/TS/AdminClient.pm | 1 -
mgmt/RecordsConfig.cc | 2 -
proxy/config/Makefile.am | 1 -
proxy/config/log_hosts.config.default | 13 ----
proxy/logging/LogConfig.cc | 67 ----------------
proxy/logging/LogConfig.h | 1 -
tests/README.md | 1 -
.../gold_tests/autest-site/trafficserver.test.ext | 5 --
17 files changed, 313 deletions(-)
diff --git a/cmd/traffic_manager/AddConfigFilesHere.cc b/cmd/traffic_manager/AddConfigFilesHere.cc
index fb872fa..cd55894 100644
--- a/cmd/traffic_manager/AddConfigFilesHere.cc
+++ b/cmd/traffic_manager/AddConfigFilesHere.cc
@@ -61,7 +61,6 @@ initializeRegistry()
ink_assert(!"Configuration Object Registry Initialized More than Once");
}
- configFiles->addFile("log_hosts.config", false);
configFiles->addFile("logging.config", false);
configFiles->addFile("storage.config", false);
configFiles->addFile("socks.config", false);
diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc
index 7bbc0a7..2c4a551 100644
--- a/cmd/traffic_manager/traffic_manager.cc
+++ b/cmd/traffic_manager/traffic_manager.cc
@@ -987,9 +987,6 @@ fileUpdated(char *fname, bool incVersion)
} else if (strcmp(fname, "hosting.config") == 0) {
lmgmt->signalFileChange("proxy.config.cache.hosting_filename");
- } else if (strcmp(fname, "log_hosts.config") == 0) {
- lmgmt->signalFileChange("proxy.config.log.hosts_config_file");
-
} else if (strcmp(fname, "logging.config") == 0) {
lmgmt->signalFileChange("proxy.config.log.config.filename");
diff --git a/doc/.tx/config b/doc/.tx/config
index 0ceede8..939b687 100644
--- a/doc/.tx/config
+++ b/doc/.tx/config
@@ -87,11 +87,6 @@ file_filter = locale/<lang>/LC_MESSAGES/admin-guide/files/ip_allow.config.en.po
source_file = _build/locale/pot/admin-guide/files/ip_allow.config.en.pot
source_lang = en
-[apache-traffic-server-6x.admin-guide--files--log_hosts_config_en]
-file_filter = locale/<lang>/LC_MESSAGES/admin-guide/files/log_hosts.config.en.po
-source_file = _build/locale/pot/admin-guide/files/log_hosts.config.en.pot
-source_lang = en
-
[apache-traffic-server-6x.admin-guide--files--logging.config_en]
file_filter = locale/<lang>/LC_MESSAGES/admin-guide/files/logging.config.en.po
source_file = _build/locale/pot/admin-guide/files/logging.config.en.pot
diff --git a/doc/admin-guide/files/index.en.rst b/doc/admin-guide/files/index.en.rst
index 09e7c0f..d8f2b3d 100644
--- a/doc/admin-guide/files/index.en.rst
+++ b/doc/admin-guide/files/index.en.rst
@@ -28,7 +28,6 @@ Configuration Files
cache.config.en
hosting.config.en
ip_allow.config.en
- log_hosts.config.en
logging.config.en
parent.config.en
plugin.config.en
@@ -53,9 +52,6 @@ Configuration Files
Controls access to the |TS| cache based on source IP addresses and networks
including limiting individual HTTP methods.
-:doc:`log_hosts.config.en`
- Defines origin servers for which separate logs should be maintained.
-
:doc:`logging.config.en`
Defines custom log file formats, filters, and processing options.
diff --git a/doc/admin-guide/files/log_hosts.config.en.rst b/doc/admin-guide/files/log_hosts.config.en.rst
deleted file mode 100644
index e712d7a..0000000
--- a/doc/admin-guide/files/log_hosts.config.en.rst
+++ /dev/null
@@ -1,66 +0,0 @@
-.. Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
-.. include:: ../../common.defs
-
-.. configfile:: log_hosts.config
-
-log_hosts.config
-****************
-
-To record HTTP transactions for different origin servers in separate log files,
-you must list each origin server hostname in the :file:`log_hosts.config` file.
-
-You should use the same :file:`log_hosts.config` file on every |TS| node in
-your cluster. After you modify the :file:`log_hosts.config` file, run the
-:option:`traffic_ctl config reload` command to apply the changes. When you
-apply the changes to a node in a cluster, |TS| automatically applies the
-changes to all other nodes in the cluster.
-
-Format
-======
-
-Each line in the :file:`log_hosts.config` file has the following format::
-
- hostname
-
-where ``hostname`` is the hostname of the origin server.
-
-.. hint::
-
- You can specify keywords in the :file:`log_hosts.config` file to
- record all transactions from origin servers with the specified keyword
- in their names in a separate log file. See the example below.
-
-Examples
-========
-
-The following example configures Traffic Server to create separate log
-files containing all HTTP transactions for the origin servers
-``webserver1``, ``webserver2``, and ``webserver3``::
-
- webserver1
- webserver2
- webserver3
-
-The following example records all HTTP transactions from origin servers
-that contain ``sports`` in their names. For example:
-``sports.yahoo.com`` and ``www.foxsports.com`` in a log file called
-``squid-sport.log`` (the Squid format is enabled)::
-
- sports
-
diff --git a/doc/admin-guide/logging/examples.en.rst b/doc/admin-guide/logging/examples.en.rst
index 9e515bb..12a51bc 100644
--- a/doc/admin-guide/logging/examples.en.rst
+++ b/doc/admin-guide/logging/examples.en.rst
@@ -214,33 +214,6 @@ following format object:
Format = '%<cqtq> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc> %<caun> %<phr>/%<pqsn> %<psct>'
}
-Separating Logs by Origin
-=========================
-
-The default :file:`log_hosts.config` file is located in the |TS| ``config``
-directory. To record HTTP transactions for different origin servers in separate
-log files, you must specify the hostname of each origin server on a separate
-line in :file:`log_hosts.config`. For example, if you specify the keyword
-``sports``, then |TS| records all HTTP transactions from ``sports.yahoo.com``
-and ``www.foxsports.com`` in a log file called ``squid-sports.log`` (if the
-Squid format is enabled).
-
-.. important::
-
- If |TS| is clustered and you enable log file collation, then you should use
- the same :file:`log_hosts.config` file on every |TS| node in the cluster.
-
-To edit the log hosts list:
-
-#. Enter the hostname of each origin server on a separate line in
- :file:`log_hosts.config`. ::
-
- webserver1
- webserver2
- webserver3
-
-#. Run the command :option:`traffic_ctl config reload` to apply the changes.
-
Hourly Rotated Squid Proxy Logs
===============================
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/files/log_hosts.config.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/files/log_hosts.config.en.po
deleted file mode 100644
index 855d4f5..0000000
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/files/log_hosts.config.en.po
+++ /dev/null
@@ -1,88 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: Apache Traffic Server 6.2\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-01-15 00:13+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EM...@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL...@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 2.2.0\n"
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:23
-msgid "log_hosts.config"
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:25
-msgid ""
-"To record HTTP transactions for different origin servers in separate log "
-"files, you must list each origin server hostname in the :file:`log_hosts."
-"config` file."
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:28
-msgid ""
-"You should use the same :file:`log_hosts.config` file on every |TS| node in "
-"your cluster. After you modify the :file:`log_hosts.config` file, run the :"
-"option:`traffic_ctl config reload` command to apply the changes. When you "
-"apply the changes to a node in a cluster, |TS| automatically applies the "
-"changes to all other nodes in the cluster."
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:35
-msgid "Format"
-msgstr "フォーマット"
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:37
-msgid ""
-"Each line in the :file:`log_hosts.config` file has the following format::"
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:41
-msgid "where ``hostname`` is the hostname of the origin server."
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:45
-msgid ""
-"You can specify keywords in the :file:`log_hosts.config` file to record all "
-"transactions from origin servers with the specified keyword in their names "
-"in a separate log file. See the example below."
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:50
-msgid "Examples"
-msgstr "例"
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:52
-msgid ""
-"The following example configures Traffic Server to create separate log "
-"files containing all HTTP transactions for the origin servers "
-"``webserver1``, ``webserver2``, and ``webserver3``::"
-msgstr ""
-
-#: ../../../admin-guide/files/log_hosts.config.en.rst:60
-msgid ""
-"The following example records all HTTP transactions from origin servers "
-"that contain ``sports`` in their names. For example: ``sports.yahoo.com`` "
-"and ``www.foxsports.com`` in a log file called ``squid-sport.log`` (the "
-"Squid format is enabled)::"
-msgstr ""
diff --git a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/managing-logs.en.po b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/managing-logs.en.po
index 9787ff5..30f6080 100644
--- a/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/managing-logs.en.po
+++ b/doc/locale/ja/LC_MESSAGES/admin-guide/monitoring/logging/managing-logs.en.po
@@ -392,37 +392,10 @@ msgid ""
"described above."
msgstr ""
-#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:227
-msgid "Separating Logs by Origin"
-msgstr ""
-
-#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:229
-msgid ""
-"The default :file:`log_hosts.config` file is located in the |TS| ``config`` "
-"directory. To record HTTP transactions for different origin servers in "
-"separate log files, you must specify the hostname of each origin server on "
-"a separate line in :file:`log_hosts.config`. For example, if you specify "
-"the keyword ``sports``, then Traffic Server records all HTTP transactions "
-"from ``sports.yahoo.com`` and ``www.foxsports.com`` in a log file called "
-"``squid-sports.log`` (if the Squid format is enabled)."
-msgstr ""
-
-#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:239
-msgid ""
-"If |TS| is clustered and you enable log file collation, then you should use "
-"the same :file:`log_hosts.config` file on every |TS| node in the cluster."
-msgstr ""
-
#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:243
msgid "To edit the log hosts list:"
msgstr ""
-#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:245
-msgid ""
-"Enter the hostname of each origin server on a separate line in :file:"
-"`log_hosts.config`. ::"
-msgstr ""
-
#: ../../../admin-guide/monitoring/logging/managing-logs.en.rst:252
#, fuzzy
msgid ""
diff --git a/doc/manpages.py b/doc/manpages.py
index e21cb00..3feb55e 100644
--- a/doc/manpages.py
+++ b/doc/manpages.py
@@ -37,7 +37,6 @@ man_pages = [
('admin-guide/files/cache.config.en', 'cache.config', u'Traffic Server cache configuration file', None, '5'),
('admin-guide/files/hosting.config.en', 'hosting.config', u'Traffic Server domain hosting configuration file', None, '5'),
('admin-guide/files/ip_allow.config.en', 'ip_allow.config', u'Traffic Server IP access control configuration file', None, '5'),
- ('admin-guide/files/log_hosts.config.en', 'log_hosts.config', u'Traffic Server log host configuration file', None, '5'),
('admin-guide/files/logging.config.en', 'logging.config', u'Traffic Server logging configuration file', None, '5'),
('admin-guide/files/parent.config.en', 'parent.config', u'Traffic Server parent cache configuration file', None, '5'),
('admin-guide/files/plugin.config.en', 'plugin.config', u'Traffic Server global plugin configuration file', None, '5'),
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index 823b33b..0f52151 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -531,7 +531,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.log.collation_secret
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
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index c5d1fe3..0d459d1 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -1007,8 +1007,6 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.log.config.filename", RECD_STRING, "logging.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
,
- {RECT_CONFIG, "proxy.config.log.hosts_config_file", RECD_STRING, "log_hosts.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, nullptr, RECA_NULL}
- ,
{RECT_CONFIG, "proxy.config.log.collation_host", RECD_STRING, nullptr, RECU_DYNAMIC, RR_NULL, RECC_STR, "^[^[:space:]]*$", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.log.collation_port", RECD_INT, "8085", RECU_DYNAMIC, RR_REQUIRED, RECC_INT, "[0-65535]", RECA_NULL}
diff --git a/proxy/config/Makefile.am b/proxy/config/Makefile.am
index 1670ad2..bffdbf8 100644
--- a/proxy/config/Makefile.am
+++ b/proxy/config/Makefile.am
@@ -30,7 +30,6 @@ dist_sysconf_DATA = \
cache.config.default \
hosting.config.default \
ip_allow.config.default \
- log_hosts.config.default \
logging.config.default \
parent.config.default \
plugin.config.default \
diff --git a/proxy/config/log_hosts.config.default b/proxy/config/log_hosts.config.default
deleted file mode 100644
index b09781d..0000000
--- a/proxy/config/log_hosts.config.default
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# log_hosts.config
-#
-# Documentation:
-# https://docs.trafficserver.apache.org/en/latest/admin-guide/files/log_hosts.config.en.html
-#
-# This configuration file is used when the Traffic Server is configured in
-# reverse-proxy mode and access logs are to be separated by server host
-# name. This file lists the host names that are to generate separate
-# access log files.
-#
-# The format of this file is to have one host name per line.
-#
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index 4460e7c..da079dd 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -551,7 +551,6 @@ LogConfig::register_config_callbacks()
"proxy.config.log.rolling_size_mb",
"proxy.config.log.auto_delete_rolled_files",
"proxy.config.log.config.filename",
- "proxy.config.log.hosts_config_file",
"proxy.config.log.sampling_frequency",
"proxy.config.log.file_stat_frequency",
"proxy.config.log.space_used_frequency",
@@ -930,69 +929,3 @@ LogConfig::evaluate_config()
return false;
}
-
-/*-------------------------------------------------------------------------
- LogConfig::read_log_hosts_file
-
- This routine will read the log_hosts.config file to build a set of
- filters for splitting logs based on hostname fields that match the
- entries in this file.
- -------------------------------------------------------------------------*/
-
-char **
-LogConfig::read_log_hosts_file(size_t *num_hosts)
-{
- ats_scoped_str config_path(RecConfigReadConfigPath("proxy.config.log.hosts_config_file", "log_hosts.config"));
- char line[LOG_MAX_FORMAT_LINE];
- char **hosts = nullptr;
-
- Debug("log-config", "Reading log hosts from %s", (const char *)config_path);
-
- size_t nhosts = 0;
- int fd = open(config_path, O_RDONLY);
- if (fd < 0) {
- Warning("Traffic Server can't open %s for reading log hosts for splitting: %s.", (const char *)config_path, strerror(errno));
- } else {
- //
- // First, count the number of hosts in the file
- //
- while (ink_file_fd_readline(fd, LOG_MAX_FORMAT_LINE, line) > 0) {
- //
- // Ignore blank Lines and lines that begin with a '#'.
- //
- if (*line == '\n' || *line == '#') {
- continue;
- }
- ++nhosts;
- }
- //
- // Now read the hosts from the file and set-up the array entries.
- //
- if (nhosts) {
- if (lseek(fd, 0, SEEK_SET) != 0) {
- Warning("lseek failed on file %s: %s", (const char *)config_path, strerror(errno));
- nhosts = 0;
- } else {
- hosts = new char *[nhosts];
- ink_assert(hosts != nullptr);
-
- size_t i = 0;
- while (ink_file_fd_readline(fd, LOG_MAX_FORMAT_LINE, line) > 0) {
- //
- // Ignore blank Lines and lines that begin with a '#'.
- //
- if (*line == '\n' || *line == '#') {
- continue;
- }
- LogUtils::strip_trailing_newline(line);
- hosts[i] = ats_strdup(line);
- ++i;
- }
- ink_assert(i == nhosts);
- }
- }
- close(fd);
- }
- *num_hosts = nhosts;
- return hosts;
-}
diff --git a/proxy/logging/LogConfig.h b/proxy/logging/LogConfig.h
index 571f092..ead00e3 100644
--- a/proxy/logging/LogConfig.h
+++ b/proxy/logging/LogConfig.h
@@ -200,7 +200,6 @@ public:
private:
bool evaluate_config();
- char **read_log_hosts_file(size_t *nhosts);
void setup_default_values();
void setup_collation(LogConfig *prev_config);
diff --git a/tests/README.md b/tests/README.md
index fa1c486..f77e58d 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -85,7 +85,6 @@ A number of file object are define to help with adding values to a given configu
* congestion.config
* hosting.config
* ip_allow.config
- * log_hosts.config
* logging.config
* parent.config
* plugin.config
diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext b/tests/gold_tests/autest-site/trafficserver.test.ext
index c5d7be9..e5baabe 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -201,11 +201,6 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True):
tmpname = os.path.join(config_dir, fname)
p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
- fname = "log_hosts.config"
- tmpname = os.path.join(config_dir, fname)
- # p.Disk.File(tmpname,id=make_id(fname),typename="ats:config").AddLine("#
- # need something in here")
-
# magic file that should probally not exist
fname = "logging.config"
tmpname = os.path.join(config_dir, fname)
--
To stop receiving notification emails like this one, please contact
zwoop@apache.org.