feat: add structured logging with Napier multiplatform library (Closes #105) #115

Merged
shahondin1624 merged 1 commits from feature/issue-105-no-structured-logging-system into main 2026-04-04 20:58:59 +02:00
Owner

Summary

  • Integrate Napier (v2.7.1) as the multiplatform logging library, added to version catalog and commonMain dependencies
  • Replace all 4 silent catch blocks with contextual log statements at appropriate levels (ERROR for failures, WARN for recoverable issues)
  • Add INFO/DEBUG logging at key state transitions: character load/save/import, schema migration, theme preference changes
  • Create centralized AppLogger initialization utility called from the root App composable

Closes #105

Test plan

  • Verify Napier dependency resolves on all platforms (Android, JVM, JS, WASM, iOS)
  • Trigger a deserialization error and verify ERROR log appears with stack trace
  • Import invalid JSON and verify WARN log appears
  • Load/save a character and verify INFO/DEBUG logs appear
  • Toggle theme and verify DEBUG log for theme preference save

Generated with Claude Code

## Summary - Integrate Napier (v2.7.1) as the multiplatform logging library, added to version catalog and commonMain dependencies - Replace all 4 silent catch blocks with contextual log statements at appropriate levels (ERROR for failures, WARN for recoverable issues) - Add INFO/DEBUG logging at key state transitions: character load/save/import, schema migration, theme preference changes - Create centralized `AppLogger` initialization utility called from the root `App` composable Closes #105 ## Test plan - [ ] Verify Napier dependency resolves on all platforms (Android, JVM, JS, WASM, iOS) - [ ] Trigger a deserialization error and verify ERROR log appears with stack trace - [ ] Import invalid JSON and verify WARN log appears - [ ] Load/save a character and verify INFO/DEBUG logs appear - [ ] Toggle theme and verify DEBUG log for theme preference save Generated with Claude Code
shahondin1624 added 1 commit 2026-04-04 20:58:53 +02:00
Integrate Napier logging library across the shared codebase. All silent
catch blocks now log with context (ERROR/WARN level), and key state
transitions (character load/save, migration, import, theme) are logged
at INFO/DEBUG level. Platform-appropriate output is handled automatically
(Logcat on Android, console on Desktop/Web, OSLog on iOS).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shahondin1624 merged commit e90d22a465 into main 2026-04-04 20:58:59 +02:00
shahondin1624 deleted branch feature/issue-105-no-structured-logging-system 2026-04-04 20:58:59 +02:00
Sign in to join this conversation.