feat: add detailed logging for module loading and context providers
Add INFO-level logging to help diagnose module loading issues: - discovery.py: Log summary of discovered modules by tier (core/optional/internal) - service.py: Log which modules are enabled for each platform (DEBUG level) - page_context.py: Log context building with platform info and which modules contributed context with key counts Example log output: [MODULES] Auto-discovered 18 modules: 5 core, 11 optional, 2 internal [CONTEXT] Building PLATFORM context for platform 'main' with 5 enabled modules [CONTEXT] Context providers called: cms(3 keys), billing(3 keys) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -182,6 +182,11 @@ class ModuleService:
|
||||
# Resolve dependencies - add required modules
|
||||
enabled_set = self._resolve_dependencies(enabled_set)
|
||||
|
||||
logger.debug(
|
||||
f"[MODULES] Platform '{platform.code}' (id={platform_id}) has "
|
||||
f"{len(enabled_set)} modules enabled: {sorted(enabled_set)}"
|
||||
)
|
||||
|
||||
return enabled_set
|
||||
|
||||
def _migrate_json_to_junction_table(
|
||||
|
||||
Reference in New Issue
Block a user