Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions configs/logging.yaml.default
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ logging:

# Common Log Format.
- name: common
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'

# Extended Log Format.
- name: 'extended'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'

# Extended2 Log Formats
- name: "extended2"
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'

logs:
- filename: squid
Expand Down
2 changes: 1 addition & 1 deletion doc/admin-guide/files/logging.yaml.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ the logging output.

Multiple logging fields may of course be used::

'%<cqtq> %<chi> %<cqhm> %<cqtx>'
'%<cqtq> %<chi> %<cqhm> %<pqu> %<cqpv>'

Each logging field is separately enclosed in its own percent-brace set.

Expand Down
34 changes: 17 additions & 17 deletions doc/admin-guide/logging/examples.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ The following figure shows a sample log entry in a Netscape Common log file.

The numbered sections correspond to the following log fields in |TS|:

=== ====== ====================================================================
No. Field Description
=== ====== ====================================================================
1 chi The IP address of the client's host machine.
2 -- This hyphen (``-``) is always present in Netscape log entries.
3 caun The authenticated client username. A hyphen (``-``) means no
authentication was required.
4 cqtn The date and time of the client request, enclosed in brackets.
5 cqtx The request line, enclosed in quotes.
6 pssc The proxy response status code (HTTP reply code).
7 pscl The length of the |TS| response to the client in bytes.
=== ====== ====================================================================
=== ============= ===============================================================
No. Field Description
=== ============= ===============================================================
1 chi The IP address of the client's host machine.
2 -- This hyphen (``-``) is always present in Netscape log entries.
3 caun The authenticated client username. A hyphen (``-``) means no
authentication was required.
4 cqtn The date and time of the client request, enclosed in brackets.
5 cqhm,pqu,cqpv The request line, enclosed in quotes.
6 pssc The proxy response status code (HTTP reply code).
7 pscl The length of the |TS| response to the client in bytes.
=== ============= ===============================================================

To recreate this as a log format in :file:`logging.yaml` you would define the
following format object:
Expand All @@ -72,7 +72,7 @@ following format object:

formats:
- name: common
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'

.. _admin-logging-examples-extended:

Expand Down Expand Up @@ -119,7 +119,7 @@ following format object:

formats:
- name: extended
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'

.. _admin-logging-examples-extended2:

Expand Down Expand Up @@ -158,7 +158,7 @@ following format object:

formats:
- name: extended2
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'

.. _admin-logging-examples-squid:

Expand Down Expand Up @@ -261,7 +261,7 @@ of the event data.
.. code:: yaml

ourformat = format {
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'
}

log.binary {
Expand All @@ -286,7 +286,7 @@ for them to a UNIX pipe that the alerting software can constantly read from.

formats:
- name: canaryformat
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'

filters:
- name: canaryfilter
Expand Down
17 changes: 8 additions & 9 deletions doc/admin-guide/logging/formatting.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -584,19 +584,18 @@ sshv Origin Response Origin server's response HTTP version.
Request Details
~~~~~~~~~~~~~~~

.. _cqtx:

The following logging fields are used to obtain the actual HTTP request
details.
The following logging fields show the details of the actual HTTP request and can be used in combination to reproduce a client request line (e.g. ``GET http://www.company.com HTTP/1.0``).

===== ============== ==========================================================
Field Source Description
===== ============== ==========================================================
cqtx Client Request The full HTTP client request text, minus headers, e.g.
``GET http://www.company.com HTTP/1.0``. In reverse proxy
mode, |TS| logs rewritten/mapped URL (according to the
rules in :file:`remap.config`), not the pristine/unmapped
URL.
cqhm Client Request HTTP method used in the client request to the |TS| proxy
(e.g. ``GET``, ``POST``, etc.).
pqu Proxy Request URL of the proxy request from |TS| to the origin. If a
remap rule is used (:file:`remap.config`), the original
client URL is replaced with the URL in the target of the
remap rule.
cqpv Client Request Client request protocol and version.
===== ============== ==========================================================

.. _admin-logging-fields-ssl:
Expand Down
9 changes: 0 additions & 9 deletions doc/appendices/faq.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ In Squid- and Netscape-format log files, what do the cache result codes mean?

This is described in detail in the :ref:`admin-logging-cache-results` documentation.

What is recorded by the ``cqtx`` field in a custom log file?
------------------------------------------------------------

- In *forward proxy mode*, the ``cqtx`` field records the complete client
request in the log file (for example, ``GET http://www.company.com HTTP/1.0``).
- In *reverse proxy mode*, the ``cqtx`` field records the hostname or IP
address of the origin server because Traffic Server first remaps the
request as per map rules in the :file:`remap.config` file.

Does Traffic Server refresh entries in its host database after a certain period of time if they have not been used?
-------------------------------------------------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ msgid "The date and time of the client request, enclosed in brackets."
msgstr "クライアントリクエストの角括弧で囲まれた日時"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:167
msgid "cqtx"
msgstr "cqtx"
msgid "cqhm pqu cqpv"
msgstr "cqhm pqu cqpv"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:167
msgid "The request line, enclosed in quotes."
Expand Down Expand Up @@ -977,15 +977,14 @@ msgstr "``cqhl``"
#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:398
#, fuzzy
msgid "``cqhm``"
msgstr "``cqhl``"
msgstr "``cqhm``"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:397
msgid ""
"The HTTP method in the client request to |TS|: ``GET``, ``POST``, and so on "
"(subset of ``cqtx``)."
"The HTTP method in the client request to |TS|: ``GET``, ``POST``, and so on. "
msgstr ""
"|TS| へのクライアントリクエストの HTTP メソッド。``GET`` や ``POST`` やその"
"他のものです。( ``cqtx`` のサブセット )"
"他のものです。"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:403
msgid "The client request HTTP version."
Expand Down Expand Up @@ -1126,11 +1125,6 @@ msgstr "``sssc``"
msgid "The cipher used by |TS| to communicate with the client over SSL."
msgstr "SSL 上でクライアントと通信するのに |TS| が使用した暗号。"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:479
#, fuzzy
msgid "``cqtx``"
msgstr "``\"cqtx\"``"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:473
msgid "The full HTTP client request text, minus headers; for example, ::"
msgstr "ヘッダーを除く HTTP クライアントリクエストテキストの全て。例えば"
Expand All @@ -1152,11 +1146,9 @@ msgstr "``cqhl``"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:484
msgid ""
"The universal resource identifier (URI) of the request from client to |TS| "
"(subset of ``cqtx`` )."
"The universal resource identifier (URI) of the request from client to |TS| ."
msgstr ""
"|TS| へのクライアントからのリクエストの universal resource identifier (URI) "
"(``cqtx`` のサブセット)"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:500
#, fuzzy
Expand Down Expand Up @@ -1961,11 +1953,6 @@ msgstr "[`cqtn`_]"
msgid "\"req\""
msgstr "\"req\""

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:873
#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:899
msgid "\"`cqtx`_\""
msgstr "\"`cqtx`_\""

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:874
#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:900
msgid "s1"
Expand Down Expand Up @@ -2099,10 +2086,6 @@ msgstr "``[cqtn]``"
msgid "``\"req\"``"
msgstr "``\"req\"``"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:935
msgid "``\"cqtx\"``"
msgstr "``\"cqtx\"``"

#: ../../../admin-guide/monitoring/logging/log-formats.en.rst:936
msgid "``s1``"
msgstr "``s1``"
Expand Down
26 changes: 0 additions & 26 deletions doc/locale/ja/LC_MESSAGES/appendices/faq.en.po
Original file line number Diff line number Diff line change
Expand Up @@ -132,32 +132,6 @@ msgid ""
msgstr ""
"これについては :ref:`log-formats-squid-format` に詳細に説明されています。"

#: ../../../appendices/faq.en.rst:66
msgid "What is recorded by the ``cqtx`` field in a custom log file?"
msgstr ""
"カスタムログファイル内の ``cqtx`` フィールドには何が記録されていますか?"

#: ../../../appendices/faq.en.rst:68
msgid ""
"In *forward proxy mode*, the ``cqtx`` field records the complete client "
"request in the log file (for example, ``GET http://www.company.com "
"HTTP/1.0``)."
msgstr ""
"*フォワードプロキシーモード* では、 ``cqtx`` フィールドは完全なクライアント"
"のリクエストをログファイルに記録します (例: ``GET http://www.company.com "
"HTTP/1.0``)。"

#: ../../../appendices/faq.en.rst:70
msgid ""
"In *reverse proxy mode*, the ``cqtx`` field records the hostname or IP "
"address of the origin server because Traffic Server first remaps the "
"request as per map rules in the :file:`remap.config` file."
msgstr ""
"*リバースプロキシーモード* では ``cqtx`` フィールドはオリジンサーバーのホス"
"ト名または IP アドレスを記録します。なぜなら Traffic Server はリクエストを :"
"file:`remap.config` ファイル内のマッピングルールごとにリクエストをまずリマッ"
"プを行うからです。"

#: ../../../appendices/faq.en.rst:75
msgid ""
"Does Traffic Server refresh entries in its host database after a certain "
Expand Down
5 changes: 5 additions & 0 deletions doc/release-notes/upgrading.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,8 @@ Metrics
------------------

The HTTP connection metric proxy.process.http.dead_server.no_requests has been renamed to proxy.process.http.down_server.no_requests.

Logging
------------------

The ``cqtx`` log field has been removed, but can be replaced by ``cqhm pqu cqpv``.
5 changes: 0 additions & 5 deletions proxy/logging/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,6 @@ Log::init_fields()
global_field_list.add(field, false);
field_symbol_hash.emplace("cqtt", field);

field =
new LogField("client_req_text", "cqtx", LogField::STRING, &LogAccess::marshal_client_req_text, &LogAccess::unmarshal_http_text);
global_field_list.add(field, false);
field_symbol_hash.emplace("cqtx", field);

field = new LogField("client_req_http_method", "cqhm", LogField::STRING, &LogAccess::marshal_client_req_http_method,
&LogAccess::unmarshal_str);
global_field_list.add(field, false);
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/connect/connect.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __setupTS(self):
logging:
formats:
- name: common
format: '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl>'
format: '%<chi> - %<caun> [%<cqtn>] "%<cqhm> %<pqu> %<cqpv>" %<pssc> %<pscl>'
logs:
- filename: access
format: common
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/connect/gold/connect_access.gold
Original file line number Diff line number Diff line change
@@ -1 +1 @@
`` - - [``] "CONNECT ``/ HTTP/1.1" 200 ``
`` - - [``] "CONNECT ``/ http/1.1" 200 ``
6 changes: 3 additions & 3 deletions tests/gold_tests/h2/gold/httpbin_access.gold
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[``] GET http://127.0.0.1:``/get HTTP/1.1 http/2 `` `` TCP_MISS 200 ``
[``] GET http://127.0.0.1:``/bytes/0 HTTP/1.1 http/2 `` `` TCP_MISS 200 0
[``] GET http://127.0.0.1:``/stream-bytes/102400?seed=0 HTTP/1.1 http/2 `` `` TCP_MISS 200 102400
[``] GET http://127.0.0.1:``/get http/2 `` `` TCP_MISS 200 ``
[``] GET http://127.0.0.1:``/bytes/0 http/2 `` `` TCP_MISS 200 0
[``] GET http://127.0.0.1:``/stream-bytes/102400?seed=0 http/2 `` `` TCP_MISS 200 102400
``
4 changes: 2 additions & 2 deletions tests/gold_tests/h2/httpbin.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Condition.HasCurlFeature('http2'),
Condition.HasProgram("shasum", "shasum need to be installed on system for this test to work"),
)
#Test.ContinueOnFail = True
# Test.ContinueOnFail = True

# ----
# Setup httpbin Origin Server
Expand Down Expand Up @@ -65,7 +65,7 @@
logging:
formats:
- name: access
format: '[%<cqtn>] %<cqtx> %<cqpv> %<cqssv> %<cqssc> %<crc> %<pssc> %<pscl>'
format: '[%<cqtn>] %<cqhm> %<pqu> %<cqpv> %<cqssv> %<cqssc> %<crc> %<pssc> %<pscl>'

logs:
- filename: access
Expand Down