reformat logged output
This commit is contained in:
parent
c7bcf95a86
commit
8829ffe08b
@ -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)
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user