# New logfile after 69 lines

**URL:** <https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933>\
**Category:** Help\
**Created:** [December 19, 2021, 10:45am UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933 "2021-12-19T10:45:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![fr4nk](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@fr4nk](https://community.letsencrypt.org/u/fr4nk)\
**Post date:** [December 19, 2021, 10:45am UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/1 "2021-12-19T10:45:36Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![orangepizza](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/orangepizza/32/19597_2.png) [@orangepizza](https://community.letsencrypt.org/u/orangepizza)\
**Post date:** [December 19, 2021, 10:48am UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/2 "2021-12-19T10:48:17Z")

</div>

wouldn't that handled by logrotation package?

**/etc/logrotate.conf** maybe?

---

<div class="post-metadata">

**Author:** ![MikeMcQ](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mikemcq/32/52772_2.png) [@MikeMcQ](https://community.letsencrypt.org/u/MikeMcQ)\
**Post date:** [December 19, 2021, 2:18pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/3 "2021-12-19T14:18:05Z")

</div>

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

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

Does that help?

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 19, 2021, 3:03pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/4 "2021-12-19T15:03:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fr4nk](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@fr4nk](https://community.letsencrypt.org/u/fr4nk)\
**Post date:** [December 20, 2021, 11:35am UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/5 "2021-12-20T11:35:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 20, 2021, 11:59am UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/6 "2021-12-20T11:59:43Z")

</div>

It's not.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [December 20, 2021, 2:04pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/7 "2021-12-20T14:04:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [December 20, 2021, 2:10pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/8 "2021-12-20T14:10:26Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![fr4nk](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@fr4nk](https://community.letsencrypt.org/u/fr4nk)\
**Post date:** [December 20, 2021, 8:26pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/9 "2021-12-20T20:26:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![\_az](https://avatars.discourse-cdn.com/v4/letter/_/22d042/32.png) [@\_az](https://community.letsencrypt.org/u/_az)\
**Post date:** [December 20, 2021, 8:38pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/10 "2021-12-20T20:38:40Z")

</div>

> [@Osiris](#):
>
> Certbot always makes a new file per run. It doesn't have the possibility to append log lines to an already existing log file.

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.

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [December 20, 2021, 8:43pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/11 "2021-12-20T20:43:04Z")

</div>

> [@\_az](#):
>
> As @MikeMcQ mentioned, `max-log-backups = 0` will cause Certbot to always append to the existing log file.

Interesting, so my statement above was completely wrong.. Howcome this behaviour isn't documented at [User Guide — Certbot 2.6.0 documentation](https://eff-certbot.readthedocs.io/en/stable/using.html#log-rotation) ? 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](https://github.com/certbot/certbot/blob/89ccbccff0582728faf9c48d1e055bd6d1218d1f/certbot/certbot/_internal/cli/ __init__.py#L86-L92). 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](https://github.com/certbot/certbot/pull/9146)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [January 19, 2022, 8:43pm UTC](https://community.letsencrypt.org/t/new-logfile-after-69-lines/167933/12 "2022-01-19T20:43:48Z")

</div>

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