-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winston.transports.MongoDB pushes empty root path "/" #192
Comments
Hi @azwinlam! Can you, please, share your Winston config and, ideally, a minimal reproducible example? |
Thanks! Edit for formatting
|
Let me try to explain the problem again. When using normal winston logging transport to file. The log is "perfect" in the sense that only requests that passes through route eg. /restaurant, /restaurant/id/, /user, are being logged with meta (good data). When using winstonMongodb. I am receiving all of the above AND empty " / " routes. Basically doubling my log file with empty meta data from / and the other half is good data from above. |
When using normal winston to push logs to file, only routes (non root only, ( / ) ) gets saved. On mongodbwinston, I am receiving many lines of root routes with no meta, no data.
Anyone have similar problems?
{'method': 'GET', 'path': '/restaurant', 'userId': '60f91de2aacd8b54faa7b662', 'username': 'admin', 'query': {}}
{'method': 'GET', 'path': '/', 'userId': None, 'username': None, 'query': {}} <==== This being logged unneccesarily
{'method': 'GET', 'path': '/', 'userId': None, 'username': None, 'query': {}}
{'method': 'GET', 'path': '/', 'userId': None, 'username': None, 'query': {}}
{'method': 'GET', 'path': '/', 'userId': None, 'username': None, 'query': {}}
{'method': 'GET', 'path': '/restaurant', 'userId': '60f91de2aacd8b54faa7b662', 'username': 'admin', 'query': {}}
The text was updated successfully, but these errors were encountered: