From 8829ffe08bca2d2159e87b646638d4f8580e9b2a Mon Sep 17 00:00:00 2001 From: lpm0073 Date: Thu, 6 Oct 2022 13:24:37 -0500 Subject: [PATCH] reformat logged output --- wp_oauth_backend/wp_oauth.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp_oauth_backend/wp_oauth.py b/wp_oauth_backend/wp_oauth.py index b2ddb7c..6fdb393 100644 --- a/wp_oauth_backend/wp_oauth.py +++ b/wp_oauth_backend/wp_oauth.py @@ -256,7 +256,7 @@ class StepwiseMathWPOAuth2(BaseOAuth2): def get_user_details(self, response) -> dict: if not self.is_valid_get_user_details_response(response): logger.error( - "get_user_details() - received an invalid response object of {t}:{response} Cannot continue. Returning: {retval}".format( + "get_user_details() received an invalid response object of {t}:{response} Cannot continue. Returning: {retval}".format( t=self.get_response_type(response), response=json.dumps(response, sort_keys=True, indent=4), retval=json.dumps(self.user_details, sort_keys=True, indent=4), @@ -287,7 +287,7 @@ class StepwiseMathWPOAuth2(BaseOAuth2): # ------------------------------------------------------------- if VERBOSE_LOGGING: logger.info( - "get_user_details() - returning {t}: {response}".format( + "get_user_details() returning {t}: {response}".format( t=self.get_response_type(response), response=json.dumps(response, sort_keys=True, indent=4), ) @@ -299,7 +299,7 @@ class StepwiseMathWPOAuth2(BaseOAuth2): # conform to the structure of a wp-oauth dict. if not self.is_wp_oauth_response(response): logger.warning( - "get_user_details() - response object of {t} is not a valid wp-oauth object: {response}. Cannot continue. returning: {retval}".format( + "get_user_details() response object of {t} is not a valid wp-oauth object: {response}. Cannot continue. returning: {retval}".format( t=self.get_response_type(response), response=json.dumps(response, sort_keys=True, indent=4), retval=json.dumps(self.user_details, sort_keys=True, indent=4), @@ -311,7 +311,7 @@ class StepwiseMathWPOAuth2(BaseOAuth2): # expected use case #1: response object is a dict with all required keys. # ------------------------------------------------------------- if VERBOSE_LOGGING: - logger.info("get_user_details() - processing response object") + logger.info("get_user_details() processing response object") # try to parse out the first and last names split_name = response.get("display_name", "").split() @@ -340,7 +340,7 @@ class StepwiseMathWPOAuth2(BaseOAuth2): } if VERBOSE_LOGGING: logger.info( - "get_user_details() - finish. user_details: {user_details}".format( + "get_user_details() returning: {user_details}".format( user_details=json.dumps(self.user_details, sort_keys=True, indent=4) ) )