# Letsencrypt.log overwritten it instead of appended with every command

**URL:** <https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971>\
**Category:** Help\
**Created:** [November 9, 2017, 12:42pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971 "2017-11-09T12:42:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![paolobenve](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/paolobenve/32/16969_2.png) [@paolobenve](https://community.letsencrypt.org/u/paolobenve)\
**Post date:** [November 9, 2017, 12:42pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/1 "2017-11-09T12:42:39Z")

</div>

certbot 0.19

It looks like every certbot command overwrites letsencrypt.log instead of appending output to it.

I think it should append new content. A bug?

---

<div class="post-metadata">

**Author:** ![cpu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/cpu/32/84514_2.png) [@cpu](https://community.letsencrypt.org/u/cpu)\
**Post date:** [November 9, 2017, 1:24pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/2 "2017-11-09T13:24:57Z")

</div>

@schoen @bmw - Do you know whether this is a Certbot bug or is there a configuration parameter that needs to be used for log rotation?

---

<div class="post-metadata">

**Author:** ![bytecamp](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@bytecamp](https://community.letsencrypt.org/u/bytecamp)\
**Post date:** [November 9, 2017, 1:26pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/3 "2017-11-09T13:26:58Z")

</div>

> [@paolobenve](#):
>
> It looks like every certbot command overwrites letsencrypt.log instead of appending output to it.

Do you have any hooks deployed that may cause this behaviour?

---

<div class="post-metadata">

**Author:** ![bmw](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/bmw/32/7797_2.png) [@bmw](https://community.letsencrypt.org/u/bmw)\
**Post date:** [November 9, 2017, 6:37pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/4 "2017-11-09T18:37:29Z")

</div>

Are there other log files in Certbot’s log directory (which is `/var/log/letsencrypt` by default)?

By default, Certbot rotates its logs keeping one log for each run (up to 1000 logs) where `letsencrypt.log` is the log from the most recent run and other log files have a number appended to the end of the file name. This behavior is described at [https://certbot.eff.org/docs/using.html#log-rotation](https://certbot.eff.org/docs/using.html#log-rotation) and can be disabled/modified through the command line flag `--max-log-backups`.

---

<div class="post-metadata">

**Author:** ![paolobenve](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/paolobenve/32/16969_2.png) [@paolobenve](https://community.letsencrypt.org/u/paolobenve)\
**Post date:** [November 9, 2017, 6:40pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/5 "2017-11-09T18:40:47Z")

</div>

ah ok, every certbot run produces a different log. OK

---

<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:** [December 9, 2017, 6:41pm UTC](https://community.letsencrypt.org/t/letsencrypt-log-overwritten-it-instead-of-appended-with-every-command/45971/6 "2017-12-09T18:41:08Z")

</div>

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