From cd04d99bc0013d0f7ebc8dfc738854d54044f79f Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 4 Aug 2016 09:33:09 +1000 Subject: [PATCH] TS-4711: Remove proxy.config.log.custom_logs_enabled. --- ci/tsqa/tests/test_custom_log.py | 3 -- doc/admin-guide/files/records.config.en.rst | 28 ------------------- .../monitoring/logging/log-formats.en.rst | 4 +-- lib/perl/lib/Apache/TS/AdminClient.pm | 1 - mgmt/RecordsConfig.cc | 2 -- proxy/logging/LogConfig.cc | 12 ++------ tools/traffic_shell.pl | 4 --- 7 files changed, 3 insertions(+), 51 deletions(-) diff --git a/ci/tsqa/tests/test_custom_log.py b/ci/tsqa/tests/test_custom_log.py index 15cb418680d..749f3a1a786 100644 --- a/ci/tsqa/tests/test_custom_log.py +++ b/ci/tsqa/tests/test_custom_log.py @@ -40,9 +40,6 @@ def setUpEnv(cls, env): 'map / http://www.linkedin.com/ @action=deny' ) cls.log_file_name = 'test_log_field' - cls.configs['records.config']['CONFIG'].update({ - 'proxy.config.log.custom_logs_enabled': 1, - }) cls.log_file_path = os.path.join(cls.environment.layout.prefix, 'var/log/test_log_field.log') cls.log_etc_file = os.path.join(cls.environment.layout.prefix, 'etc/trafficserver/logs_xml.config') diff --git a/doc/admin-guide/files/records.config.en.rst b/doc/admin-guide/files/records.config.en.rst index bea44730306..2e6e9eb0a1a 100644 --- a/doc/admin-guide/files/records.config.en.rst +++ b/doc/admin-guide/files/records.config.en.rst @@ -2625,34 +2625,6 @@ Logging Configuration others, even if specified in the configuration file. Permissions for existing log files are not changed when the configuration is modified. -.. ts:cv:: CONFIG proxy.config.log.custom_logs_enabled INT 1 - :reloadable: - - Enables (``1``) or disables (``0``) custom logging. - -.. note:: - The following defaults (with the format``CONFIG proxy.config.log.[format].[default]`` have been removed from ``records.config``. - They can be accessed by editing :file:`logs_xml.config`. - - - ``log_enabled`` INT 1 - Enables (``1``) or disables (``0``) the file format. - - - ``log_is_ascii`` INT 0 - The log file type: - - ``1`` = ASCII - - ``0`` = binary - - - ``log_name`` STRING [format] - The filename (ex. :ref:`squid log `). - - - ``log_header`` STRING NULL - The file header text (ex. :ref:`squid log `). - - The format can be either ``squid`` (:ref:`admin-logging-format-squid`), - ``common`` (:ref:`admin-logging-format-common`), - ``extended`` (:ref:`admin-logging-format-extended`), - or ``extended2`` (:ref:`admin-logging-format-extended2`). - .. ts:cv:: LOCAL proxy.local.log.collation_mode INT 0 :reloadable: diff --git a/doc/admin-guide/monitoring/logging/log-formats.en.rst b/doc/admin-guide/monitoring/logging/log-formats.en.rst index e44cb6e608c..64c5a512208 100644 --- a/doc/admin-guide/monitoring/logging/log-formats.en.rst +++ b/doc/admin-guide/monitoring/logging/log-formats.en.rst @@ -94,9 +94,7 @@ variety of off-the-shelf log-analysis packages. You should use one of the standard event log formats unless you need information that these formats do not provide. -These formats may be used by enabling the :ts:cv:`proxy.config.log.custom_logs_enabled` -setting in :file:`records.config` and adding appropriate entries to -:file:`logs_xml.config`. +These formats may be used by editing the ``LogObject`` entry in :file:`logs_xml.config`. .. _admin-logging-format-squid: diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm index c30096bac19..0b67bdd9ebe 100644 --- a/lib/perl/lib/Apache/TS/AdminClient.pm +++ b/lib/perl/lib/Apache/TS/AdminClient.pm @@ -580,7 +580,6 @@ The Apache Traffic Server Administration Manual will explain what these strings proxy.config.log.collation_port proxy.config.log.collation_retry_sec proxy.config.log.collation_secret - proxy.config.log.custom_logs_enabled proxy.config.log.file_stat_frequency proxy.config.log.hostname proxy.config.log.hosts_config_file diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc index f702a9fd4f7..3a982d4490f 100644 --- a/mgmt/RecordsConfig.cc +++ b/mgmt/RecordsConfig.cc @@ -1146,8 +1146,6 @@ static const RecordElement RecordsConfig[] = , {RECT_CONFIG, "proxy.config.log.logfile_perm", RECD_STRING, "rw-r--r--", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , - {RECT_CONFIG, "proxy.config.log.custom_logs_enabled", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} - , {RECT_CONFIG, "proxy.config.log.xml_config_file", RECD_STRING, "logs_xml.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} , {RECT_CONFIG, "proxy.config.log.hosts_config_file", RECD_STRING, "log_hosts.config", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL} diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc index b63c1d928f9..e6df3a76bb3 100644 --- a/proxy/logging/LogConfig.cc +++ b/proxy/logging/LogConfig.cc @@ -97,8 +97,6 @@ LogConfig::setup_default_values() auto_delete_rolled_files = true; roll_log_files_now = false; - custom_logs_enabled = false; - sampling_frequency = 1; file_stat_frequency = 16; space_used_frequency = 900; @@ -233,10 +231,6 @@ LogConfig::read_configuration_variables() val = (int)REC_ConfigReadInteger("proxy.config.log.auto_delete_rolled_files"); auto_delete_rolled_files = (val > 0); - // CUSTOM LOGGING - val = (int)REC_ConfigReadInteger("proxy.config.log.custom_logs_enabled"); - custom_logs_enabled = (val > 0); - // PERFORMANCE val = (int)REC_ConfigReadInteger("proxy.config.log.sampling_frequency"); if (val > 0) { @@ -505,10 +499,8 @@ LogConfig::setup_log_objects() global_filter_list.clear(); - if (custom_logs_enabled) { - /* Read xml configuration from logs_xml.config file. */ - read_xml_log_config(); - } + // Read xml configuration from logs_xml.config file. + read_xml_log_config(); // open local pipes so readers can see them // diff --git a/tools/traffic_shell.pl b/tools/traffic_shell.pl index e70a11292e2..0951606c6c8 100755 --- a/tools/traffic_shell.pl +++ b/tools/traffic_shell.pl @@ -523,8 +523,6 @@ sub show_logging { my $preproc_threads = get_on_off("proxy.config.log.collation_preproc_threads"); my $orphan_space = get_int("proxy.config.log.max_space_mb_for_orphan_logs"); - my $custom_log = get_on_off("proxy.config.log.custom_logs_enabled"); - my $rolling = get_on_off("proxy.config.log.rolling_enabled"); my $roll_offset_hr = get_int("proxy.config.log.rolling_offset_hr"); my $roll_interval = get_int("proxy.config.log.rolling_interval_sec"); @@ -545,8 +543,6 @@ sub show_logging { Preproc Threads ------------------------ $preproc_threads Space Limit for Orphan Files ----------- $orphan_space MB -Custom Logs ------------------------------ $custom_log - Rolling ---------------------------------- $rolling Roll Offset Hour ----------------------- $roll_offset_hr Roll Interval -------------------------- $roll_interval s