Skip to content

Commit

Permalink
replace print with logger in slack integration
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDudas-Intuitial committed Nov 26, 2024
1 parent 03423ce commit c277dbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion analytics/src/analytics/integrations/slack.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# ruff: noqa: T201
"""Integrate with Slack to post messages and get channel information."""

import logging
import functools
from collections.abc import Callable
from dataclasses import dataclass
Expand All @@ -9,6 +11,7 @@
from slack_sdk.errors import SlackApiError
from slack_sdk.web.slack_response import SlackResponse

logger = logging.getLogger(__name__)

@dataclass
class FileMapping:
Expand All @@ -30,7 +33,7 @@ def try_to_make_slackbot_api_call_and_catch_error(
try:
return slackbot_api_call(*args, **kwargs)
except SlackApiError as e:
print(e)
logger.info(e)
return None

return try_to_make_slackbot_api_call_and_catch_error
Expand Down

0 comments on commit c277dbc

Please sign in to comment.