General code clean up for easier debugging.

This commit is contained in:
Scott Idem
2022-02-15 11:51:16 -05:00
parent 85e2195297
commit a2f755b914
3 changed files with 7 additions and 7 deletions

View File

@@ -949,7 +949,7 @@ def get_id_random(
table_name: str,
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
) -> str|bool|None:
log.setLevel(lo_lvl)
log.setLevel(log_lvl)
data = { 'id': record_id }
sql = f"""

View File

@@ -317,9 +317,9 @@ def create_contact_obj(
address_id: int = None,
create_sub_obj: bool = False,
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
) -> int|bool:
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
log.setLevel(log_lvl)
# ### SECTION ### Secondary data validation
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?
@@ -443,9 +443,9 @@ def update_contact_obj(
create_sub_obj: bool = False,
fail_any: bool = False, # Fail if any thing goes wrong for sub objects
return_dict: bool = False,
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
) -> bool:
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
log.setLevel(log_lvl)
# ### SECTION ### Secondary data validation
# NOTE: Remove at future date. Is this check needed if we trust that the ID is checked ahead of time?

View File

@@ -466,9 +466,9 @@ def create_update_aether_person(
cvent_contact_obj: dict,
account_id: str,
person_id: str=None,
log_lvl: int = logging.WARNING, # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
):
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
log.setLevel(log_lvl)
# Important variables used more than once.
person_external_id = None