feat: Frontend Logger Module (#84) #92

Merged
egullickson merged 1 commits from issue-84-frontend-logger-module into main 2026-02-05 02:13:13 +00:00
Owner

Summary

  • Create centralized frontend logger with level-based filtering (debug/info/warn/error)
  • Add sensitive data sanitization for tokens, passwords, secrets, and credentials
  • Support VITE_LOG_LEVEL environment variable with graceful fallback to 'info'
  • Logger fails silently to prevent app crashes

Fixes #84

Files Changed

  • Created: frontend/src/utils/logger.ts - Logger utility with sanitization
  • Modified: frontend/src/vite-env.d.ts - Added VITE_LOG_LEVEL type

Test Plan

  • npm run type-check passes
  • npm run lint shows no new warnings in changed files
  • Manual browser testing with different VITE_LOG_LEVEL values
  • Verify sensitive data redaction in console output
  • Test on mobile viewport (320px)
  • Test on desktop viewport (1920px)

Acceptance Criteria

  • VITE_LOG_LEVEL controls frontend log verbosity
  • Invalid VITE_LOG_LEVEL shows warning and falls back to 'info'
  • Sensitive data (tokens, passwords) are sanitized
  • Logger fails silently (no app crashes)
  • Works on mobile viewport (320px) - requires browser testing
  • Works on desktop viewport (1920px) - requires browser testing

Generated with Claude Code

## Summary - Create centralized frontend logger with level-based filtering (debug/info/warn/error) - Add sensitive data sanitization for tokens, passwords, secrets, and credentials - Support VITE_LOG_LEVEL environment variable with graceful fallback to 'info' - Logger fails silently to prevent app crashes Fixes #84 ## Files Changed - **Created**: `frontend/src/utils/logger.ts` - Logger utility with sanitization - **Modified**: `frontend/src/vite-env.d.ts` - Added VITE_LOG_LEVEL type ## Test Plan - [x] `npm run type-check` passes - [x] `npm run lint` shows no new warnings in changed files - [ ] Manual browser testing with different VITE_LOG_LEVEL values - [ ] Verify sensitive data redaction in console output - [ ] Test on mobile viewport (320px) - [ ] Test on desktop viewport (1920px) ## Acceptance Criteria - [x] VITE_LOG_LEVEL controls frontend log verbosity - [x] Invalid VITE_LOG_LEVEL shows warning and falls back to 'info' - [x] Sensitive data (tokens, passwords) are sanitized - [x] Logger fails silently (no app crashes) - [ ] Works on mobile viewport (320px) - requires browser testing - [ ] Works on desktop viewport (1920px) - requires browser testing Generated with [Claude Code](https://claude.com/claude-code)
egullickson added 1 commit 2026-02-05 02:05:57 +00:00
feat: add frontend logger module with level filtering and sanitization (refs #84)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m13s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 21s
Deploy to Staging / Verify Staging (pull_request) Successful in 2m25s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
241478ed80
- Create centralized logger utility at frontend/src/utils/logger.ts
- Support debug/info/warn/error levels controlled by VITE_LOG_LEVEL
- Sanitize sensitive data (tokens, passwords, secrets) in log output
- Graceful fallback to 'info' level for invalid VITE_LOG_LEVEL values
- Add VITE_LOG_LEVEL to ImportMetaEnv type definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
egullickson merged commit 915f15c610 into main 2026-02-05 02:13:13 +00:00
egullickson deleted branch issue-84-frontend-logger-module 2026-02-05 02:13:13 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: egullickson/motovaultpro#92