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
55 changes: 39 additions & 16 deletions doc/admin-guide/monitoring/logging/log-formats.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ Field Symbol Description
8 sssc The origin server response status code.
9 sshl The server response transfer length; the body length in the
origin server response to |TS|, in bytes.
10 cqbl The client request transfer length; the body length in the
10 cqcl The client request transfer length; the body length in the
client request to |TS|, in bytes.
11 pqbl The proxy request transfer length; the body length in the |TS|
11 pqcl The proxy request transfer length; the body length in the |TS|
request to the origin server.
12 cqhl The client request header length; the header length in the
client request to |TS|.
Expand Down Expand Up @@ -377,10 +377,10 @@ The following list describes |TS| custom logging fields.
``chp``
The port number of the client's host machine.

.. _cqbl:
.. _cqcl:

``cqbl``
The client request transfer length; the body length in the client
``cqcl``
The client request content length; the body length in the client
request to |TS| (in bytes).

.. _cqhl:
Expand All @@ -389,6 +389,12 @@ The following list describes |TS| custom logging fields.
The client request header length; the header length in the client
request to |TS|.

.. _cqql:

``cqql``
The total client request length; the header length and content length of
the client request to |TS|.

.. _cqhm:

``cqhm``
Expand Down Expand Up @@ -577,8 +583,13 @@ The following list describes |TS| custom logging fields.
.. _csshl:

``csshl``
The cached header length in the origin server response to Traffic
Server (in bytes).
The cached header length in the origin server response to |TS| (in bytes).

.. _cssql:

``cssql``
The total cached response length; the header length and content
length of a cached origin server response.

.. _csshv:

Expand Down Expand Up @@ -665,10 +676,10 @@ The following list describes |TS| custom logging fields.
The plugin tag for the transaction. This is set for plugin driven
transactions via :c:func:`TSHttpConnectWithPluginId`.

.. _pqbl:
.. _pqcl:

``pqbl``
The proxy request transfer length; the body length in Traffic
``pqcl``
The proxy request content length; the body length in Traffic
Server's request to the origin server.

.. _pqhl:
Expand All @@ -677,6 +688,12 @@ The following list describes |TS| custom logging fields.
The proxy request header length; the header length in Traffic
Server's request to the origin server.

.. _pqql:

``pqql``
The total proxy request length; the header length and content length
of Traffic Server's request to the origin server.

.. _pqsi:

``pqsi``
Expand Down Expand Up @@ -756,6 +773,12 @@ The following list describes |TS| custom logging fields.
``sshl``
The header length (in bytes) in the origin server response to |TS|.

.. _ssql:

``ssql``
The total server response length; the header length and content length
of the origin server response to |TS|.

.. _sshv:

``sshv``
Expand Down Expand Up @@ -917,8 +940,8 @@ s1 `pssc`_
c1 `pscl`_
s2 `sssc`_
c2 `sscl`_
b1 `cqbl`_
b2 `pqbl`_
b1 `cqcl`_
b2 `pqcl`_
h1 `cqhl`_
h2 `pshl`_
h3 `pqhl`_
Expand All @@ -931,7 +954,7 @@ This is the equivalent XML configuration for the log above::
<LogFormat>
<Name = "extended"/>
<Format = "%<chi> - %<caun> [%<cqtn>] \"%<cqtx>\" %<pssc> %<pscl>
%<sssc> %<sscl> %<cqbl> %<pqbl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>"/>
%<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>"/>
</LogFormat>

.. _admin-log-formats-netscape-extended2:
Expand All @@ -953,8 +976,8 @@ Netscape Extended-2 Field Symbols
``c1`` ``pscl``
``s2`` ``sssc``
``c2`` ``sscl``
``b1`` ``cqbl``
``b2`` ``pqbl``
``b1`` ``cqcl``
``b2`` ``pqcl``
``h1`` ``cqhl``
``h2`` ``pshl``
``h3`` ``pqhl``
Expand All @@ -971,7 +994,7 @@ This is the equivalent XML configuration for the log above::
<LogFormat>
<Name = "extended2"/>
<Format = "%<chi> - %<caun> [%<cqtn>] \"%<cqtx>\" %<pssc> %<pscl>
%<sssc> %<sscl> %<cqbl> %<pqbl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>"/>
%<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>"/>
</LogFormat>

.. _log-field-slicing:
Expand Down
4 changes: 2 additions & 2 deletions proxy/config/logging.config.default
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ common = format {

-- Extended Log Format.
extended = format {
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqbl> %<pqbl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts>'
}

-- Extended2 Log Formats
extended2 = format {
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqbl> %<pqbl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'
Format = '%<chi> - %<caun> [%<cqtn>] "%<cqtx>" %<pssc> %<pscl> %<sssc> %<sscl> %<cqcl> %<pqcl> %<cqhl> %<pshl> %<pqhl> %<sshl> %<tts> %<phr> %<cfsc> %<pfsc> %<crc>'
}

log.binary {
Expand Down
36 changes: 34 additions & 2 deletions proxy/logging/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ Log::init_fields()
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "cqhl", field);

field = new LogField("client_req_squid_len", "cqql", LogField::sINT, &LogAccess::marshal_client_req_squid_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "cqql", field);

field = new LogField("cache_lookup_url_canonical", "cluc", LogField::STRING, &LogAccess::marshal_cache_lookup_url_canon,
(LogField::UnmarshalFunc)&LogAccess::unmarshal_str);
global_field_list.add(field, false);
Expand All @@ -481,11 +486,17 @@ Log::init_fields()
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "puuid", field);

field = new LogField("client_req_body_len", "cqbl", LogField::sINT, &LogAccess::marshal_client_req_body_len,
// TS-4765: This alias is deprecated to be removed in 8.0.
field = new LogField("client_req_body_len", "cqbl", LogField::sINT, &LogAccess::marshal_client_req_content_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "cqbl", field);

field = new LogField("client_req_content_len", "cqcl", LogField::sINT, &LogAccess::marshal_client_req_content_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "cqcl", field);

field = new LogField("client_req_tcp_reused", "cqtr", LogField::dINT, &LogAccess::marshal_client_req_tcp_reused,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
Expand Down Expand Up @@ -617,11 +628,22 @@ Log::init_fields()
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "pqhl", field);

field = new LogField("proxy_req_body_len", "pqbl", LogField::sINT, &LogAccess::marshal_proxy_req_body_len,
field = new LogField("proxy_req_squid_len", "pqql", LogField::sINT, &LogAccess::marshal_proxy_req_squid_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "pqql", field);

// TS-4765: This alias is deprecated to be removed in 8.0.
field = new LogField("proxy_req_body_len", "pqbl", LogField::sINT, &LogAccess::marshal_proxy_req_content_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "pqbl", field);

field = new LogField("proxy_req_content_len", "pqcl", LogField::sINT, &LogAccess::marshal_proxy_req_content_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "pqcl", field);

field = new LogField("proxy_req_server_name", "pqsn", LogField::STRING, &LogAccess::marshal_proxy_req_server_name,
(LogField::UnmarshalFunc)&LogAccess::unmarshal_str);
global_field_list.add(field, false);
Expand Down Expand Up @@ -707,6 +729,11 @@ Log::init_fields()
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "sshl", field);

field = new LogField("server_resp_squid_len", "ssql", LogField::sINT, &LogAccess::marshal_server_resp_squid_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "ssql", field);

field = new LogField("server_resp_http_version", "sshv", LogField::dINT, &LogAccess::marshal_server_resp_http_version,
&LogAccess::unmarshal_http_version);
global_field_list.add(field, false);
Expand Down Expand Up @@ -757,6 +784,11 @@ Log::init_fields()
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "csshl", field);

field = new LogField("cached_resp_squid_len", "cssql", LogField::sINT, &LogAccess::marshal_cache_resp_squid_len,
&LogAccess::unmarshal_int_to_str);
global_field_list.add(field, false);
ink_hash_table_insert(field_symbol_hash, "cssql", field);

field = new LogField("cached_resp_http_version", "csshv", LogField::dINT, &LogAccess::marshal_cache_resp_http_version,
&LogAccess::unmarshal_http_version);
global_field_list.add(field, false);
Expand Down
Loading