-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, the application does not follow a consistent standard for:
- Logging: log levels, structure, and context are not unified.
- HTTP responses: response shape varies depending on the module or error type.
This inconsistency makes it harder to debug, monitor, and maintain the system.
🔧 Proposed Change:
-
Define a standard log format including at least:
timestamplevel(info, warn, error, debug)context(module/use case)message- optional
metadata(requestId, userId, etc.)
-
Define a unified HTTP response schema, e.g.:
{ "success": true | false, "message": "string", "data": {}, "errors": [] } -
Update all modules (controllers/use-cases) to use this standard.
-
Add helpers/wrappers to enforce consistency (e.g.
Loggerservice,HttpResponsebuilder).
✅ Expected Benefits:
- Consistent and predictable logs across the entire system.
- Easier debugging and error tracing (with correlation IDs).
- Unified HTTP responses improve DX (developer experience) for frontend and API consumers.
Metadata
Metadata
Assignees
Labels
No labels