diff options
author | osirisinferi <github@flut.nl.eu.org> | 2022-09-16 16:34:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-16 16:34:02 +0300 |
commit | d214da191d507cd8957ae70fa17aad133db6bc5d (patch) | |
tree | adf106e73b71faf782bece5b699216769d8a567d | |
parent | 0326cbf95e48656a0da489f6bba2cd940b06b5d9 (diff) |
Certbot-specific temp log dir prefix (#9406)
Fixes #9405.
-rw-r--r-- | certbot/CHANGELOG.md | 2 | ||||
-rw-r--r-- | certbot/certbot/_internal/log.py | 2 |
2 files changed, 2 insertions, 2 deletions
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) |