#36380: SQL is formatted for logging regardless of whether it will be logged
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  Jacob
                                     |  Walls
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  debug-sql            |             Triage Stage:  Accepted
  format_debug_sq                    |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):

 Requiring customizing logging per project doesn't seem ideal (users don't
 want to deal with it). Also, a project may use a mix and of SQL and Non-
 SQL backends. Could `self.db.ops.format_debug_sql` be passed in `extra`
 and used in `QueryFormatter`?

 There is still the behavior change (introduced in
 d8f093908c504ae0dbc39d3f5231f7d7920dde37) that SQL is formatted outside of
 running tests (with the proposal it's only if the user has configured
 debug logging), correct? I'm unsure if this is worth the risk of affecting
 users in some development environments. It would be interesting to know
 from Jacob exactly how large the SQL statements were that resulted in the
 3 second response time.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36380#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019713cae1cc-29699e1c-67fa-4420-b53c-18751aa6f5fa-000000%40eu-central-1.amazonses.com.

Reply via email to