Open LeoNaveen10 opened 1 year ago
while hapi-pino is perfectly generating logs for server started but for server stop not generating any logs even though those events are enabled by default. I am attaching hapi-pino registration with server.
const customLevel =process.env.BUILD_ENV == 'stage' || process.env.BUILD_ENV == 'prod' ? 'debug' : 'trace'; await server.register({ plugin: require('hapi-pino'), options: { prettyPrint: false, logRequestStart: true, logRequestComplete: true, redact: ['req.headers', 'res.headers'], level: customLevel, }, });
{"level":30,"time":1677652120597,"pid":22096,"hostname":","created":1677652120297,"started":1677652120587,"host":"","port":1111,"protocol":"http","id":"***:22096:lepar8q1","uri":"http://******:1111","address":"::","msg":"server started"}
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
while hapi-pino is perfectly generating logs for server started but for server stop not generating any logs even though those events are enabled by default. I am attaching hapi-pino registration with server.
logs for server start is as below.