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:

  1. Keep console.log statements but reduce verbosity
  2. Migrate to createLogger from @libs-dev-tools/debug-utils with short logs
  3. Disable all logs in these services
  4. 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


🔗 Related


Auto-generated by MCP Smart Consolidation