Skip to content
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

Add logging of transaction operations, i.e. begin transaction, commit ... #1007

Closed
krilbe opened this issue Dec 2, 2021 · 3 comments
Closed

Comments

@krilbe
Copy link

krilbe commented Dec 2, 2021

Logging of executed SQL is available, which is good, but it would be nice to also have transaction operations in the log. It would be a great addition when analyzing what's happening. SQL logging should probably (optionally?) include transaction identifier in that case.

@cincuranet
Copy link
Member

I agree. Accidentally I needed that couple days ago and I hacked it together. I'll clean it up and should be ready to go.

@cincuranet
Copy link
Member

@krilbe Do you think the level should be info or debug?

@krilbe
Copy link
Author

krilbe commented Feb 22, 2022

Best would be to be able to specify from client code - some apps may even need to be able to specify it differently for different SQL commands even in the same transaction.

If that's too much hassle, then I'd suggest debug. I wouldn't think that it would be a very common situation to want SQL to be logged in production where no debugging is in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants