Changes between Initial Version and Version 1 of Ticket #36380, comment 12


Ignore:
Timestamp:
May 31, 2025, 7:47:00 AM (5 months ago)
Author:
Jacob Walls

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36380, comment 12

    initial v1  
    11> Requiring customizing logging per project doesn't seem ideal (users don't want to deal with it).
    22
    3 What I like about Natalia's proposal is that since we would no longer format SQL by default outside tests, no customization is necessary to keep a working query logger configuration. Users with existing (custom or default) logging configs will just get the pre-4.2 behavior of unformatted SQL in their logs (good from a performance standpoint). Users that want formatted SQL in their logs have an upgrade path via the example formatters Natalia's PR provides: copy the new default config, and change the `django.db.backends` logger from `ERROR` to `DEBUG`, and preserve any other custom handling). This way the "risk" is opt-in.
     3What I like about Natalia's proposal is that since we would no longer format SQL by default outside tests, no customization is necessary to keep a working query logger configuration. Users with existing (custom or default) logging configs will just get the status quo behavior of unformatted SQL in their logs (good from a performance standpoint). Users that want formatted SQL in their logs have an upgrade path via the example formatters Natalia's PR provides: copy the new default config, and change the `django.db.backends` logger from `ERROR` to `DEBUG`, and preserve any other custom handling). This way the "risk" is opt-in.
Back to Top