-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Django logging not working when djdt is enabled #1814
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
Comments
Hi @forrestkouakou, can you create a reproducible environment for this? |
I've just dug deep into django's guts to figure out why our console logging isn't working either. It looks like it's caused by the DjDTCursorWrapper ( My guess is that the resolution to this is that |
@tim-schilling based on this would you support a revert of e7575e8? |
@dannosaur thank you for that investigation! That's super helpful. Do you have a reproducible use case? @living180 I think I'm on board for a revert, though I'd prefer to roll forward a fix. |
@tim-schilling yes, I can reproduce the issue in my project. |
@dannosaur Sorry, I meant can you create a way for me to reproduce the error so that I can investigate and attempt a fix? |
@tim-schilling lol, sorry! I'll try and put something together quickly tomorrow that reproduces the issue. I don't think it's a complex setup though - django 4.2, any version of psycopg (2 or 3), and djdt 4.1. Leave it with me, I'll post back tomorrow with a git repo. Edit: it's probably the case with all the database drivers, but I can only test with postgres. I don't think the engine is relevant though. |
No worries. I can set up postgres on my end. Having the ability to pull a repo, set up a database and reproduce the problem makes this much, much easier to investigate. Otherwise I'm attempting random things to try to reproduce the behavior. I appreciate your work on this so far, thank you! |
@tim-schilling here you go: https://github.com/dannosaur/djdttest The django admin is installed with a user. Login LMK if you need anything else, happy to help! |
Thank you @dannosaur, I was able to reproduce this. |
Can folks test their project against #1820 to confirm that works? |
@tim-schilling confirmed working now in my project. |
I recently noticed that django default logging is not working when I enable djdt.
django-debug-toolbar==4.1.0
Django==4.2.3
Is it possible to have SQL pannel and logging for sql queries work together?
Without djdt

With djdt

The text was updated successfully, but these errors were encountered: