From 8bde657e28285034e772d15b4bf9e046f4693ea6 Mon Sep 17 00:00:00 2001 From: msclock Date: Wed, 3 Jan 2024 21:30:35 +0800 Subject: [PATCH] perf: opt to log command args Signed-off-by: msclock --- src/sphinx_deployment/cli.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/sphinx_deployment/cli.py b/src/sphinx_deployment/cli.py index cb4dbbb..38d4df4 100644 --- a/src/sphinx_deployment/cli.py +++ b/src/sphinx_deployment/cli.py @@ -336,7 +336,7 @@ def create_command( version: str, ) -> None: logger.debug( - f"create args: {input_path} {output_path} {push} {remote} {branch} {message} {version}" + f"create args: {input_path} {output_path} {remote} {branch} {message} {push} {version}" ) _ = sync_remote(remote, branch) @@ -419,7 +419,9 @@ def delete_command( push: bool, delete: typing.Tuple[str], ) -> None: - logger.debug(f"delete args: {input_path} {output_path} {remote} {branch} {push}") + logger.debug( + f"delete args: {input_path} {output_path} {remote} {branch} {message} {push} {delete}" + ) _ = sync_remote(remote, branch) version_path = Path(output_path) / "versions.json" @@ -479,7 +481,7 @@ def default_command( version: str, ) -> None: logger.debug( - f"default args: {input_path} {output_path} {remote} {branch} {message} {push}" + f"default args: {input_path} {output_path} {remote} {branch} {message} {push} {version}" ) version_path = Path(output_path) / "versions.json" @@ -545,7 +547,7 @@ def rename_command( dst: str, ) -> None: logger.debug( - f"rename args: {input_path} {output_path} {remote} {branch} {push} {src} {dst}" + f"rename args: {input_path} {output_path} {remote} {branch} {message} {push} {src} {dst}" ) if src == dst: @@ -626,7 +628,7 @@ def rename_command( @opt_remote @opt_branch def list_command(input_path: str, output_path: str, remote: str, branch: str) -> None: - logger.debug(f"list {input_path} {output_path} {remote}/{branch}") + logger.debug(f"list args: {input_path} {output_path} {remote} {branch}") _ = sync_remote(remote, branch) version_path = Path(output_path) / "versions.json" @@ -643,7 +645,7 @@ def list_command(input_path: str, output_path: str, remote: str, branch: str) -> def serve( input_path: str, output_path: str, remote: str, branch: str, port: int ) -> None: - logger.debug(f"serve {input_path} {output_path} {remote}/{branch}") + logger.debug(f"serve args: {input_path} {output_path} {remote} {branch} {port}") _ = sync_remote(remote, branch) version_path = Path(output_path) / "versions.json"