Less debug!

This commit is contained in:
Scott Idem
2026-02-06 13:56:40 -05:00
parent b10b5839c7
commit b9c00e423c
2 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ def bootstrap_db_config(settings: Any) -> bool:
# CRITICAL: Deferred import to prevent boot-time circular dependencies # CRITICAL: Deferred import to prevent boot-time circular dependencies
from app.db_sql import sql_select from app.db_sql import sql_select
log.setLevel(logging.DEBUG) # log.setLevel(logging.DEBUG)
cfg_id = settings.AETHER_CFG.get('id', 0) cfg_id = settings.AETHER_CFG.get('id', 0)
log.info(f"Bootstrapping Aether system configuration from DB (cfg_id={cfg_id})...") log.info(f"Bootstrapping Aether system configuration from DB (cfg_id={cfg_id})...")
@@ -117,7 +117,7 @@ def bootstrap_db_config(settings: Any) -> bool:
# if aether_cfg_sql.get('path_hosted_files_root'): settings.FILES_PATH['hosted_files_root'] = aether_cfg_sql.get('path_hosted_files_root') # if aether_cfg_sql.get('path_hosted_files_root'): settings.FILES_PATH['hosted_files_root'] = aether_cfg_sql.get('path_hosted_files_root')
# if aether_cfg_sql.get('path_hosted_tmp_root'): settings.FILES_PATH['hosted_tmp_root'] = aether_cfg_sql.get('path_hosted_tmp_root') # if aether_cfg_sql.get('path_hosted_tmp_root'): settings.FILES_PATH['hosted_tmp_root'] = aether_cfg_sql.get('path_hosted_tmp_root')
log.setLevel(logging.DEBUG) # log.setLevel(logging.DEBUG)
log.info("Aether API system configuration successfully synchronized with DB.") log.info("Aether API system configuration successfully synchronized with DB.")
log.debug(f"Current Database settings after bootstrap: DB_SERVER={settings.DB_SERVER} DB_PORT={settings.DB_PORT} DB_NAME={settings.DB_NAME} DB_USER={settings.DB_USER} DB_PASS={'****' if settings.DB_PASS else ''}") log.debug(f"Current Database settings after bootstrap: DB_SERVER={settings.DB_SERVER} DB_PORT={settings.DB_PORT} DB_NAME={settings.DB_NAME} DB_USER={settings.DB_USER} DB_PASS={'****' if settings.DB_PASS else ''}")
log.debug(f"Current SMTP settings after bootstrap: {settings.SMTP}") log.debug(f"Current SMTP settings after bootstrap: {settings.SMTP}")

View File

@@ -13,7 +13,7 @@ from app.log import log, logger_reset
from app import lib_sql_core from app import lib_sql_core
from app.lib_sql_core import sql_connect, set_last_sql_error from app.lib_sql_core import sql_connect, set_last_sql_error
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL # log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# Helper for resolving random IDs # Helper for resolving random IDs
from app.lib_redis_helpers import lookup_id_random_pop from app.lib_redis_helpers import lookup_id_random_pop
@@ -307,7 +307,7 @@ def sql_select(
if hasattr(result, 'returns_rows') and not result.returns_rows: if hasattr(result, 'returns_rows') and not result.returns_rows:
log.warning("SQL Result does not return rows (ResourceClosedError prevented).") log.warning("SQL Result does not return rows (ResourceClosedError prevented).")
return [] if as_list else None return [] if as_list else None
rows = result.all() rows = result.all()
except Exception as e: except Exception as e:
log.error(f"SQL Fetch Error: {e}") log.error(f"SQL Fetch Error: {e}")