Implementation: How should we reduce console noise from user-context.service...
Documentation for Sessions
⚙️ Implementation: How should we reduce console noise from user-context.service...
📋 Decision Context
Question:
How should we reduce console noise from user-context.service.ts and space-api.service.ts?
Task: Continue logging migration - reduce noise from user-context and space-api services
🎯 Decision Made
Chosen:
Migrate to createLogger from @libs-dev-tools/debug-utils with short logs
Options Considered:
- Keep console.log statements but reduce verbosity
- Migrate to createLogger from @libs-dev-tools/debug-utils with short logs
- Disable all logs in these services
- Use LoggerService but remove verbose logs
💭 Reasoning
user-context.service.ts and space-api.service.ts were generating excessive console logs (31 and 29 logs respectively). Migrated both to centralized logging system (createLogger from @libs-dev-tools/debug-utils). user-context.service.ts: Using 'auth' category, replaced all console.log with log.short() for essential context changes, kept error logs. space-api.service.ts: Using 'sync' category, replaced all console.log with log.short() for API operations, kept error logs. Both services now use short, controlled logs that can be enabled/disabled via LOG_CONFIG categories. This reduces noise while maintaining essential debugging capability when needed.
📁 Files Involved
libs/libs-foundational/storage-system/src/core/user-context/user-context.service.tslibs/libs-foundational/core-angular/src/lib/services/space-api.service.ts
🔗 Related
- Decision ID:
dev_1767729594936_geh1enn - Session: 22
- Workspace: editor2
Auto-generated by MCP Smart Consolidation