Skip to content

Rotated squid.log files have hostname coming from request #7922

@lukenowak

Description

@lukenowak

My etc/trafficserver/logging.yaml is:

formats:
  - name: squid
    format: '%<cqtq> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc> %<cluc> %<caun> %<phr>/%<shn> %<psct>'
logs:
  - filename: squid
    format: squid
    mode: ascii
    rolling_enabled: 1
    rolling_interval_sec: 10
    rolling_offset_hr: 0

(the small rolling_interval_sec is to see the issue) and I see that it uses rotated filename like:

squid.log_www.example.com.20210604.10h28m50s-20210604.10h29m30s.old

Where www.example.com is just on of sites being served via Trafficserver.
Instead of usual:

squid.log_HOST.IP.V.4.20210604.10h28m50s-20210604.10h29m30s.old
(it was like with with ATS 8).

I tried to set:

CONFIG proxy.config.log.hostname STRING justit
To have:

squid.log_justit.20210604.10h28m50s-20210604.10h29m30s.old

But it seemed to be ignore during rotation.

The rest of config.log from records.config are:

CONFIG proxy.config.log.logging_enabled INT 3
CONFIG proxy.config.log.max_space_mb_for_logs INT 25000
CONFIG proxy.config.log.max_space_mb_headroom INT 1000
CONFIG proxy.config.log.rolling_enabled INT 1
CONFIG proxy.config.log.rolling_interval_sec INT 86400
CONFIG proxy.config.log.rolling_size_mb INT 10
CONFIG proxy.config.log.auto_delete_rolled_files INT 1
CONFIG proxy.config.log.periodic_tasks_interval INT 5

Which are correctly overridden in etc/trafficserver/logging.yaml

Trafficserver version used is 9.0.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions