Skip to content

Commit

Permalink
Revert "Pass params into logger.{info,debug} (#913)"
Browse files Browse the repository at this point in the history
This reverts commit c45cc1d.
  • Loading branch information
richardm-stripe committed Feb 6, 2023
1 parent cb850c4 commit c9ab903
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions stripe/util.py
Expand Up @@ -53,14 +53,14 @@ def log_debug(message, **params):
msg = logfmt(dict(message=message, **params))
if _console_log_level() == "debug":
print(msg, file=sys.stderr)
logger.debug(msg, params)
logger.debug(msg)


def log_info(message, **params):
msg = logfmt(dict(message=message, **params))
if _console_log_level() in ["debug", "info"]:
print(msg, file=sys.stderr)
logger.info(msg, params)
logger.info(msg)


def _test_or_live_environment():
Expand Down
4 changes: 1 addition & 3 deletions tests/test_util.py
Expand Up @@ -65,9 +65,7 @@ def log_test_loop(self, test_cases, logging_func, logger_name, mocker):
)
else:
print_mock.assert_not_called()
logger_mock.assert_called_once_with(
"message='foo \\nbar' y=3", {"y": 3}
)
logger_mock.assert_called_once_with("message='foo \\nbar' y=3")
finally:
mocker.stopall()

Expand Down

0 comments on commit c9ab903

Please sign in to comment.