Skip to content

Commit

Permalink
feat: print deployment log to logger if level is DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Justintime50 committed Dec 21, 2023
1 parent 06e6335 commit 43fca62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Next Release

- Adds support for Python 3.12
- Prints deployment log to the error logger if `log_level` is set to `DEBUG`

## v1.0.3 (2023-10-25)

Expand Down
3 changes: 3 additions & 0 deletions harvey/utils/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def kill_deployment(message: str, webhook: Dict[str, Any]):
deployment_logs = error_message + '\n' + message
store_deployment_details(webhook, _strip_emojis_from_logs(deployment_logs))

if Config.log_level == 'DEBUG':
logger.error(deployment_logs)

# Only unlock deployments that were locked by the system and not a user to preserve their preferences
deployment_lock = lookup_project_lock(project_name=Webhook.repo_full_name(webhook))
if deployment_lock.get('system_lock'):
Expand Down

0 comments on commit 43fca62

Please sign in to comment.