Skip to content

Commit 5a1f5f5

Browse files
authored
Better logging
1 parent 4f85156 commit 5a1f5f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ssl-check-to-slack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ def split_matcher(matcher):
5050
# Slack web hook example
5151
# https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXXXX
5252
def post_slack_message(hook_urls, message):
53-
logger.info(f'Posting the following message:\n{message}')
5453
headers = {'Content-type': 'application/json'}
5554
for hook_url in hook_urls:
55+
logger.info(f'Sending the following message to {len(hook_url[:-10])*"#"+hook_url[-10:]}:\n {json.dumps(message)}')
5656
connection = http.client.HTTPSConnection('hooks.slack.com')
5757
connection.request('POST',
5858
hook_url.replace('https://hooks.slack.com', ''),

0 commit comments

Comments
 (0)