From 7b591fdf436550c5dbdcbf146efa1e741f4ad4bf Mon Sep 17 00:00:00 2001 From: Richard Marmorstein <52928443+richardm-stripe@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:03:18 -0800 Subject: [PATCH] Revert "Pass params into logger.{info,debug} (#913)" (#923) This reverts commit c45cc1dfb8a395d5980bef0b454124520cc87618. --- stripe/util.py | 4 ++-- tests/test_util.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/stripe/util.py b/stripe/util.py index d4dbd53a6..b5ad1ab84 100644 --- a/stripe/util.py +++ b/stripe/util.py @@ -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(): diff --git a/tests/test_util.py b/tests/test_util.py index 3106e6481..ce3758c48 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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()