1

I want to see what sqlite3 commands are called by modules based on the python sqlite3 module.

But I don't find a way to let the python sqlite3 module to do so. Would you please let me know whether there is a way to do so? If so, how to do it?

EDIT:

How can I log queries in Sqlite3 with Python? The answers in the link have no addressed my question. Please open this post.

I just know sqlite3 is used in the module. But I don't want to go deep in the module to find out where sqlite3 is called then add connection.set_trace_callback(print) for each connection used. The solution must be straight-forward (for example, just add something in the main script, without having to go deeper.) The answer there also does not show how logging should be used.

  • No. I just know sqlite3 is used in the module. But I don't want to go deep in the module to find out where sqlite3 is called then add `connection.set_trace_callback(print)` for each `connection` used. The solution must be straight-forward (for example, just add something in the main script, without having to go deeper.) The answer there also does not show how logging should be used. –  Apr 03 '21 at 16:51
  • Please open this post. The link did not asnwer my questionn as I explained above. –  Apr 03 '21 at 18:40

0 Answers0