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

[Help Wanted] logging requests and responses inside nestJs / adminJs #1737

Open
darhelm opened this issue Jan 25, 2025 · 1 comment
Open

Comments

@darhelm
Copy link

darhelm commented Jan 25, 2025

i will try my best to describe the issue i've got to the best of my abilities, i have an admin js panel running with nest and prisma as it's adaptors, what i want is to see logs when someone switches from say host:3000/admin to host:3000/admin/resources/model, i need to keep a log of the requests and their responses and the body of those requests and responses. i tried my hand at middlewares but i wasn't very successful with that as i was only able to get logs before the login attempt. after that i got nothing when navigating inside the panel itself.

@dziraf
Copy link
Contributor

dziraf commented Feb 3, 2025

For API calls you can just create a middleware and it should work. Or you can create a before hook that's added to all resource actions. As for logging frontend navigation you could probably either use GTM, create a custom component which is visible on all routes (i. e. override TopBar component) or you could use a service like LogRocket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants