Hi all,
I have just installed Traffic Server 8.0.2 (the version from Debian 10 
repositories) and I noticed some problems with logging.

In particular, I would like to rotate the binary log every day at 7.00 AM and 
rotate even if the file is empty (at 6.55 the daily cron script analyzes the 
squid.blog file with calamaris script, so I lose 5 minutes of potential 
traffic, but it's ok).
The rotation does not work as expected, and as a worst behaviour, after 
rotation the daemon keeps logging into the rotated file.

Please look at this ls listing:
root@it-net-proxy2:/etc/trafficserver# ll /var/log/trafficserver/
total 92
drwxr-x--- 2 trafficserver adm            4096 Jun  1 07:00 .
drwxr-xr-x 9 root          root           4096 Jun  3 00:00 ..
-rw-r--r-- 1 trafficserver trafficserver    27 May 27 15:09 .diags.log.meta
-rw-r--r-- 1 trafficserver trafficserver    27 May 27 15:09 .manager.log.meta
-rw-r--r-- 1 trafficserver trafficserver    67 May 28 11:51 .squid.blog.meta
-rw-r--r-- 1 trafficserver trafficserver  8190 Jun  3 16:51 diags.log
-rw-r--r-- 1 trafficserver trafficserver 51039 Jun  3 16:51 manager.log
-rw-r--r-- 1 trafficserver trafficserver  2472 May 28 11:47 
squid.blog_it-net-proxy2.20210527.15h13m48s-20210528.00h00m02s.old
-rw-r--r-- 1 trafficserver trafficserver  3408 Jun  3 12:05 
squid.blog_it-net-proxy2.20210528.11h51m31s-20210601.07h00m01s.old
root@it-net-proxy2:/etc/trafficserver#

As you can see, there is no squid.blog file and the rotated log 
squid.blog_it-net-proxy2.20210528.11h51m31s-20210601.07h00m01s.old has been 
modified the 3rd of June, even if its title states that it contains logs till 
the 1st of june at 7 AM.
If I restart the daemon, it starts logging into the plain squid.blog again.
The log files are quite empty, as the server is in pre-production phase (only 
one client uses this proxy, with very low traffic).

Here is the relevant part of the records.config file, related to logging:

CONFIG proxy.config.log.logging_enabled INT 3
CONFIG proxy.config.log.max_space_mb_for_logs INT 10000
CONFIG proxy.config.log.max_space_mb_headroom INT 500
CONFIG proxy.config.log.rolling_enabled INT 1
CONFIG proxy.config.log.rolling_offset_hr INT 7
CONFIG proxy.config.log.rolling_interval_sec INT 86400
CONFIG proxy.config.log.rolling_allow_empty INT 1
CONFIG proxy.config.log.auto_delete_rolled_files INT 1
CONFIG proxy.config.log.periodic_tasks_interval INT 5
CONFIG proxy.config.log.rolling_max_count INT 365

What I would like to obtain is a daily rotated log file, and keep a year of 
rotated logfiles.
Is there anything wrong?
Why Traffic Server keeps logging into rotated file?

Thank you in advance for any help.

_______________________________________
Lorenzo Maurizi
Servizio Sviluppo Tecnologico
Comune di Jesi

Reply via email to