Re: [cx-oracle-users] Logging/debugging queries
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2016-10-19 14:08:50
|
Hi Piotr, There is no built-in way of logging the queries sent to the database....but cx_Oracle *does* have a way that you can do that yourself. Essentially you can subclass the connection and cursor and override the execute() method in order to perform any logging you might want to do before or after the actual execution of the statement takes place. You can see an example in action with a module called cx_OracleEx. You can see it here: https://bitbucket.org/anthony_tuininga/cx_pyoraclelib/src/dda6bfb0217bc48ea7c20cb763b3385e8fc9bfaa/cx_OracleEx.py?at=default&fileviewer=file-view-default Anthony On Wed, Oct 19, 2016 at 3:20 AM, Piotr Dobrogost < p...@20...> wrote: > Hi! > > Is there a way to configure cx_oracle so that it would log queries sent to > db? > I'm particularly interested in logging values of bound parameters. > > > Best regards, > Piotr Dobrogost > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |