python - Using psycopg2 on Windows I get unwanted debug messages -


everybuddy.

i've installed psycopg2 package psycopg2-2.5.1.win32-py2.6-pg9.2.4-release.exe found in site http://www.stickpeople.com/projects/python/win-psycopg/. can import , connect database, when run scripts on command-line (both, standard , cygwin) unwanted messages printed stderr.

for example:

conn = psycopg2.connect(host="42.42.42.42", port=5432, database="mydb", user="myuser", password="********") if conn none:     sys.exit("connection failed") print "connection successful" 

prints following:

debug:  committransaction debug:  name: unnamed; blockstate:       started; state: inprogr, xid/subid/cid: 0/1/0, nestlvl: 1, children: connection successful 

i've been unable turn messages off. searched in google couldn't find relevant, , tried changing config of standard logging module, in case of being used, still no avail.

does know how prevent messages?

thanks in advance!

it looks build made psycopg_debug flag set, should not case release build after looking @ table @ http://www.stickpeople.com/projects/python/win-psycopg/ (note last column debug build (--define psycopg_debug)). looks have psycopg_debug environment variable set. if case unsetting should prevent these debug messages emitted.

from psycopg2.txt

creating debug build

in case of problems, psycopg can configured emit detailed debug messages, can useful diagnostics , report bug. in order create debug package:

  • download , unpack psycopg source package.

  • edit "setup.cfg" file adding "psycopg_debug" flag "define" option.

  • compile , install package.

  • set "psycopg_debug" variable:

    $ export psycopg_debug=1

  • run program (making sure "psycopg2" package imported 1 compiled , not e.g. system one): will
    have copious stream of informations printed on stdout.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -