New logfile after 69 lines

Let's encrypt creates a new logfile after 69 lines. How/where can I change that to a higher number, so I don't end up with hundreds of logfiles.

centos-linux-release-8.3-1.2011.el8.noarch
Apache/2.4.37 (centos)

1 Like

wouldn't that handled by logrotation package?

/etc/logrotate.conf maybe?

2 Likes

With Certbot there is also option of: --max-log-backups

https://eff-certbot.readthedocs.io/en/stable/using.html#log-rotation

Does that help?

2 Likes

Certbot always makes a new file per run. It doesn't have the possibility to append log lines to an already existing log file.

2 Likes

this would change the number of FILES. Standard number of files is 1000. I am looking for a way to change the number of LINES per FILE.
Since @Osiris pointed out, Certbot creates a new file per run, i guess that means it is not possible to alter the number of LINES?

1 Like

It's not.

3 Likes

I bet I can make it produce more than 69 lines!

1 Like

The question is not how to have more lines.
[that's easy add -vvvv the number of lines will be a lot greater than 69 - but still only one run]

The question is how to have more runs per file.
[but why? that would just clutter any review of that file]

1 Like

The question arose before I knew that 1 FILE per run is created. You are right, more or less lines can be created, since my other server has less lines in those files. So, I will just leave it like that. Thanks for the insight.

CHeers

2 Likes

As @MikeMcQ mentioned, max-log-backups = 0 will cause Certbot to always append to the existing log file.

Some distros set this flag and do external log rotation (like Debian) but Certbot from EPEL8 does not.

3 Likes

Interesting, so my statement above was completely wrong.. Howcome this behaviour isn't documented at User Guide — Certbot 1.22.0 documentation ? Or am I reading that documentation incorrectly? From what I understood, max-log-backups does not suddenly change the certbot behaviour from "just a single log file per certbot run" to "I'll happily append everything to a single file"?

Hmm, it does say so in the helpful message. It seems the --help bug recently introduced has still eaten a lot of options from the command line options in the documentation, including --max-log-backups..

PR: Document appending behaviour of `max-log-backups = 0` in User Guide by osirisinferi · Pull Request #9146 · certbot/certbot · GitHub

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.