I have built a nodejs app with morgan module as a logger

95 views Asked by At

I'm facing an issue to add custom message to each logs. My requirement is to add custom message for individual logs according to their route. How to do that ?

lets say ,

requested the URL http://localhost/user/login

user fails the login with invalid password

I want my log to have a custom message as wrong password. This message will change for each and every route.

0

There are 0 answers