Context
Ref: #1 — Native GovTech Learning App for Public Education Systems
As the codebase grows to include complex background syncs and API integrations, debugging via standard console output becomes unmanageable, especially on mobile devices.
Problem
Modules currently rely on raw console.log and console.error statements.
- No Filtering — It is impossible to filter logs by severity (e.g., only show errors).
- Missing Context — It is difficult to identify which module or component produced a specific log entry.
- Production Limitations — Raw console logs complicate integration with production crash reporting tools later on.
Proposed Solution
Implement a standalone Logger utility in a new shared-utils/logger directory to standardize logging across all modules.
Core Features
| Feature |
Description |
| Severity Levels |
Supports DEBUG, INFO, WARN, and ERROR classifications. |
| Module Tagging |
Requires a context string (e.g., [FrappeClient]) to trace logs to their source. |
Deliverables
Why This Matters
A structured logger is a standard engineering practice that will save countless hours of debugging. It ensures that when the app goes into production, we have a clear, filterable trail of application behavior.
Context
Ref: #1 — Native GovTech Learning App for Public Education Systems
As the codebase grows to include complex background syncs and API integrations, debugging via standard console output becomes unmanageable, especially on mobile devices.
Problem
Modules currently rely on raw
console.logandconsole.errorstatements.Proposed Solution
Implement a standalone
Loggerutility in a newshared-utils/loggerdirectory to standardize logging across all modules.Core Features
DEBUG,INFO,WARN, andERRORclassifications.[FrappeClient]) to trace logs to their source.Deliverables
Loggerclass is implemented.shared-utils/loggerdirectory.Why This Matters
A structured logger is a standard engineering practice that will save countless hours of debugging. It ensures that when the app goes into production, we have a clear, filterable trail of application behavior.