diff --git a/openbb_terminal/core/log/generation/settings_logger.py b/openbb_terminal/core/log/generation/settings_logger.py index 0d2f60e6d5b3..0dc00527ea7a 100644 --- a/openbb_terminal/core/log/generation/settings_logger.py +++ b/openbb_terminal/core/log/generation/settings_logger.py @@ -68,13 +68,12 @@ def log_preferences() -> None: def log_startup() -> None: """Combined logging of all settings""" - logger.info( - "STARTUP: %s ", - json.dumps( - { - "PREFERENCES": get_current_user().preferences.to_dict(), - "KEYS": get_credentials(), - "SYSTEM": get_system(), - } - ), - ) + logger.info("STARTUP: %s ", json.dumps(get_startup())) + + +def get_startup(): + return { + "PREFERENCES": get_current_user().preferences.to_dict(), + "KEYS": get_credentials(), + "SYSTEM": get_system(), + } diff --git a/openbb_terminal/loggers.py b/openbb_terminal/loggers.py index e4a8c37596ca..111c6c9959b2 100644 --- a/openbb_terminal/loggers.py +++ b/openbb_terminal/loggers.py @@ -35,6 +35,7 @@ LogSettings, Settings, ) +from openbb_terminal.core.log.generation.settings_logger import get_startup from openbb_terminal.core.log.generation.user_logger import ( NO_USER_PLACEHOLDER, get_current_user, @@ -188,6 +189,7 @@ def send(self, record: logging.LogRecord): { "email": get_current_user().profile.email, "primaryUsage": get_current_user().profile.primary_usage, + **get_startup(), }, ) openbb_posthog.alias(get_user_uuid(), app_settings.identifier)