Skip to content

Commit

Permalink
Logging update
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcdonagh committed Aug 21, 2023
1 parent cc85573 commit e0d6168
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# v0.14.2

- Minor log verbosity update

# v0.14.1

- Fix issue where port number is being ignored because the schema definition doesn't match the code that uses it.
Expand Down
5 changes: 1 addition & 4 deletions src/opentaskpy/cli/task_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ def main() -> None:
parser.add_argument(
"-v",
"--verbosity",
help=(
"Increase verbosity:\n10 - DEBUG\n11 - VERBOSE1\n12 - VERBOSE2\n20 -"
" INFO\n30 - WARN\n40 - ERROR"
),
help="Increase verbosity:\n3 - DEBUG\n2 - VERBOSE2\n1 - VERBOSE1",
type=int,
)
parser.add_argument(
Expand Down
1 change: 1 addition & 0 deletions src/opentaskpy/remotehandlers/sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def handle_post_copy_action(self, files: list[str]) -> int:

for file in files:
try:
self.logger.info(f"Deleting file {file}")
self.sftp_client.remove(file)
except OSError:
self.logger.error(
Expand Down
1 change: 1 addition & 0 deletions src/opentaskpy/remotehandlers/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ def handle_post_copy_action(self, files: list[str]) -> int:

for file in files:
try:
self.logger.info(f"Deleting file {file}")
sftp_client.remove(file)
except OSError:
self.logger.error(
Expand Down
1 change: 1 addition & 0 deletions src/opentaskpy/taskhandlers/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ def run(self, kill_event: threading.Event | None = None) -> bool: # noqa: C901

if "postCopyAction" in self.source_file_spec:
try:
self.logger.info("Performing post copy action")
pca_result = self.source_remote_handler.handle_post_copy_action(
remote_files
)
Expand Down

0 comments on commit e0d6168

Please sign in to comment.