You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check if we can have helper methods by event, that can provide consistent context through event catalog as in ERR_DEFS
should be used in auth controller as
logEvent(req.log,LOG_EVENTS.AUTH.LOGIN.SUCCESS,{userId: user.id,method: '2FA'})// or if AsyncLocalStorage - good idea ?logEvent(LOG_EVENTS.AUTH.LOGIN.SUCCESS,{userId: user.id,method: '2FA'})
for gateway, check if we should / can refactor helpers (logAuth, logRequest, ..) leveraging on req.log.child, while maintaining a constant catalog
User Story
AS A DevOps/Backend Developer
I WANT a unified logging and error handling strategy across all microservices
SO THAT I can
Parts of project targeted
Details
should be done for gateway as a part of #36
Logger config
Logger catalog
check if we can have helper methods by event, that can provide consistent context through event catalog as in ERR_DEFS
should be used in auth controller as
for gateway, check if we should / can refactor helpers (logAuth, logRequest, ..) leveraging on
req.log.child, while maintaining a constant catalogdefault Fastify log fields
{ // --- Standard Pino/Fastify Fields (Metadata) --- "level": 30, // "info" converted to number "time": "2025-12-04T10:00:00.000Z", // 2. ISO timestamp "pid": 1234, // Process ID "reqId": "req-1", // From request.log binding (or traceId) // --- Shared Core Config (Base) --- "service": "auth-service", "env": "production", // --- `logEvent` Payload --- "event": "auth.login.success", // 8. From EVENT_CATALOG "msg": "User logged in successfully", // 9. From EVENT_CATALOG message "userId": 1, "method": "2FA", // --- Potential Extras --- "traceId": "..." }Details typing
export interfaces for
Important
redact PII in details fields (received)
Explore if logging can be efficiently automated with decorators
Requires class
Acceptance criteria
cf Wiki
Subtasks
loginstead of logger : more convenient