im tring to create a logger for my own system. I have a problem getting the res.body
, i am using morgan as a middel ware and wrote cutome tokens for getting req and res body, i can easily get the request body but not resespone body.
morgan.token('qbody', (req) => {
return JSON.stringify(req.body)
})
morgan.token('sbody', (res) => {
return JSON.stringify(res.body)
})
is there is any way to get the response body?