Here is the upstream patch:
https://gitlab.com/apt-mirror2/apt-mirror2/-/merge_requests/201
It adds a new `append_logs` setting to mirror.list, with the default
value set to `off`. I don't think we should change the default behavior
for all users.
For example, in my case, log truncation is the expected behavior — I
don't want my logs to grow too large.
06.06.2025 08:43, xiao sheng wen(肖盛文) пишет:
Hi,
在 2025/6/4 21:16, Yuri Konotopov 写道:
Hi!
04.06.2025 07:23, xiao sheng wen пишет:
Package: apt-mirror2
Version: 13-2
Severity: minor
X-Debbugs-Cc: [email protected]
Hi,
When I enable apt-mirror2 cron in /etc/cron.d/apt-mirror2,
I can't get any log about apt-mirror2 execute in $base_path/var.
I just checked fresh apt-mirror2 install and can not reproduce this issue.
Are there any files under `$base_path/var`? It should contains
`apt-mirror2.log` and one log file per mirror URL.
Yes, there two log files under under `$base_path/var`.
I use root's crontab do a test again:
crontab -l -u root
*/2 * * * * /usr/bin/apt-mirror2 > /dev/null
The log output is exist. The "> /dev/null" don't affect whether generate log
files.
The /etc/cron.d/apt-mirror2 use > /dev/null to disable the log output.
This is not a good idear. The log should keep.
I had try to delete "> /dev/null" in /etc/cron.d/apt-mirror2,
I can get the log in logfile under $base_path/var, but the logfile
can't appended.
The output of command is silenced because apt-mirror2 write log files
in addition to stdout.
Yes.
I suggest support append log.
As of now apt-mirror2 mirrors apt-mirror behavior which rewrite log file
every run.
I think it can be made configurable though.
Yes, rewrite log is the question.
I suggest set append log as default configuration.
Thanks!
--
Best regards, Yuri Konotopov