Opened 8 months ago

Last modified 3 days ago

#31090 assigned New feature

Log when DB transactions are commited and rollbacked.

Reported by: Petter Strandmark Owned by: Petter Strandmark
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Background: I was debugging database calls today with the django.db.backends log.

Problem: The BEGIN SQL calls show up in the logs, but there is no way to see when the transaction is commited or if it is rolled back.

As easy solution would be to log commits and rollbacks as well.

Change History (5)

comment:2 Changed 8 months ago by felixxm

Needs tests: set
Owner: changed from nobody to Petter Strandmark
Patch needs improvement: set
Status: newassigned
Summary: Log when DB transactions are commited and rolled backLog when DB transactions are commited and rollbacked.
Triage Stage: UnreviewedAccepted

comment:3 Changed 8 months ago by felixxm

Needs documentation: set

comment:4 Changed 8 months ago by felixxm

Note: BEGIN is logged only on SQLite as a workaround to start a transaction explicitly in autocommit mode, you will not find it in loggers for other databases.

Last edited 8 months ago by felixxm (previous) (diff)

comment:5 Changed 3 days ago by Jacob Walls

Needs tests: unset
Patch needs improvement: unset

Author updated patch

Note: See TracTickets for help on using tickets.
Back to Top