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
Currently I am only aware of doing this using serializers: logger.error({ req: request, err: err }, "message");
I'd like to achieve this without needing to pass request object to each log call, but rather set this data when logger is initialized and appear in logs when log is called:
Hello,
Currently I am only aware of doing this using serializers:
logger.error({ req: request, err: err }, "message");
I'd like to achieve this without needing to pass request object to each log call, but rather set this data when logger is initialized and appear in logs when log is called:
logger = require("lgger")
logger.setId(req.getId())
logger.info("test")
// INFO - 55 - test
Doesn't have to be the exact approach, but some variation of this. Would this be possible with child log feature?
The text was updated successfully, but these errors were encountered: