Skip to content
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

feat: Requests logger middleware #22

Closed
joseph0x45 opened this issue Jan 3, 2024 · 7 comments · Fixed by #91
Closed

feat: Requests logger middleware #22

joseph0x45 opened this issue Jan 3, 2024 · 7 comments · Fixed by #91
Assignees
Labels
backend enhancement New feature or request feature

Comments

@joseph0x45
Copy link
Owner

This middleware should only log requests either coming from the Frontend or authenticated requests going to the API.

@joseph0x45 joseph0x45 added enhancement New feature or request feature backend labels Jan 3, 2024
@joseph0x45 joseph0x45 self-assigned this Jan 3, 2024
@joseph0x45 joseph0x45 added this to Visio Jan 3, 2024
@rafiramadhana
Copy link
Collaborator

@TheWisePigeon may i know the existing condition? do we log anything?

@rafiramadhana
Copy link
Collaborator

would this be related to #9?

@joseph0x45
Copy link
Owner Author

Yes in a way

@joseph0x45
Copy link
Owner Author

What I originally planned to do is kind of like assign an id to each request and pass the id down to all the middlewares so when they log stuff they can add the request id for more context

@rafiramadhana
Copy link
Collaborator

rafiramadhana commented Jan 12, 2024

I see, I think we can solve this by generating a request id and pass it around inside a context.

So, when we are logging in lower level (e.g. repository or use case) it will have the same request id.

@rafiramadhana
Copy link
Collaborator

If you're agree, I will create a PR to demonstrate it. Later on, we can continue the discussion on that PR. Wdyt?

@joseph0x45
Copy link
Owner Author

It would be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request feature
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants