Closed frnd closed 8 years ago
Please squash all those commits so it can be more easily reviewed.
@frnd please squash your commits
sorry for this messy pull request, but this is my first one I will appreciate any help :smile:
Squash your commits so all your 8 it looks like a single commit.
git rebase -i HEAD~8
follow the instructions (add s
to all the commits from 2b5f77b
to 31519bd
)
Close the editor. git log
should show a single commit.
thanks!! I have also executed a
git pull -f
I hope everything is ok now.
I don't want to be a pain, but I'm wondering if the functionality here really needs to be within express-winston.
Setting a response header definitely seems outside of the scope of this module. And for the requestId
itself, it seems like a user could just as easily do req.requestId = Math.random()
(or UUID for robustness, but same idea) by themselves.
Thanks for your comments. No problem, I sent it so you can evaluate. :smile: The idea behind a response header is because this way you can add it to crash report the user can fill in the frontend. This way, you can trace all logs messages for the request that causes the failure.
Closing due to inactivity/feature being out of scope.
This pull request adds a logger on the express request object that generates an unique id to log messages so is possible to trace log messages that belongs to a one request. For example a route like this:
Will generate a 2 log messages like this:
The requestId will be also added to request and error logging so is easy to trace a single request from start to end.