Skip to content

Commit

Permalink
Undo logger change that broke master but wasn't reverted in beta (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Dec 8, 2023
1 parent 681d2a5 commit e7a7ebe
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 @@ -111,14 +111,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 @@ -62,9 +62,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 e7a7ebe

Please sign in to comment.