From 66dc78e6f2db5aa10b69865c62e01c60c526f32d Mon Sep 17 00:00:00 2001 From: Neil Prockter Date: Thu, 18 Sep 2025 14:28:59 +0100 Subject: [PATCH] add timestamp to cli log files --- cli/src/pcluster/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/pcluster/utils.py b/cli/src/pcluster/utils.py index 9c2c137525..c33b93be0f 100644 --- a/cli/src/pcluster/utils.py +++ b/cli/src/pcluster/utils.py @@ -271,7 +271,8 @@ def error(message) -> NoReturn: def get_cli_log_file(): - default_log_file = os.path.expanduser(os.path.join("~", ".parallelcluster", "pcluster-cli.log")) + log_timestamp = to_iso_timestr(datetime.datetime.now()) + default_log_file = os.path.expanduser(os.path.join("~", ".parallelcluster", f"pcluster-cli-{log_timestamp}.log")) return os.environ.get("PCLUSTER_LOG_FILE", default=default_log_file)