Create a shared "logging" library under @opencrvs/commons. This will encapsulate both hapi-pino and pino. For the Hapi plugin that encapsulates hapi-pino, write a log transformer that includes logged in user's userId to each log item we write.
Acceptance criteria
GIVEN
WHEN
THEN
Design
(Link to Figma)
Dev tasks
[ ] Create a shared logging module to the commons package, replace references to pino and hapi from all packages
[ ] For the Hapi plugin exported from the custom module, write a log transformer that includes logged in user's userId to each log item we write
Description
Create a shared "logging" library under
@opencrvs/commons
. This will encapsulate both hapi-pino and pino. For the Hapi plugin that encapsulates hapi-pino, write a log transformer that includes logged in user's userId to each log item we write.Acceptance criteria
GIVEN WHEN THEN
Design
(Link to Figma)
Dev tasks