Replies: 1 comment
-
Having found this, I wonder if Netbox's use of django-debug-toolbar is intercepting the SQL logs? That link suggests that you need to mess about with middleware to get around it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm completely failing to enable django SQL query logging, and I wonder if someone can tell me what I'm doing wrong.
In configuration.py I have:
I note from here:
I know that DEBUG=True is applied, because the web interface is showing me the warning banner about debug mode.
I know that logging is working and permissions are correct, because
tail -f /opt/netbox/log/netbox.log
shows some logs being appended on each page refresh:Furthermore, if I change the logger from
django.db.backends
todjango
, then I get a whole load of Django debugging crap on each page request (tons of caught exceptions like AttributeError, TypeError, ValueError, KeyError). But no SQL queries!I've found a whole bunch of third-party pages about Django SQL logging, all of them suggest that what I'm doing above is correct.
Can somebody tell me what I'm missing? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions