diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index 8c5f65e50..018eaa049 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -10,7 +10,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Changed -* +* If Certbot exits before setting up its usual log files, the temporary directory created to save logging information will begin with the name `certbot-log-` rather than a generic name. This should not be considered a [stable aspect of Certbot](https://certbot.eff.org/docs/compatibility.html) and may change again in the future. ### Fixed diff --git a/certbot/certbot/_internal/log.py b/certbot/certbot/_internal/log.py index 6d089afd4..b6b7d4601 100644 --- a/certbot/certbot/_internal/log.py +++ b/certbot/certbot/_internal/log.py @@ -264,7 +264,7 @@ class TempHandler(logging.StreamHandler): """ def __init__(self) -> None: - self._workdir = tempfile.mkdtemp() + self._workdir = tempfile.mkdtemp(prefix="certbot-log-") self.path = os.path.join(self._workdir, 'log') stream = util.safe_open(self.path, mode='w', chmod=0o600) super().__init__(stream)