fixed issue 1591:Allow sql log customization

This commit is contained in:
mdipierro
2013-07-19 04:38:55 -05:00
parent 79ac2cf607
commit 5ebaab4ac1
2 changed files with 4 additions and 2 deletions

View File

@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.07.19.04.34.00
Version 2.6.0-development+timestamp.2013.07.19.04.38.04

View File

@@ -710,6 +710,7 @@ class BaseAdapter(ConnectionPool):
os.unlink(filename)
def find_driver(self,adapter_args,uri=None):
self.adapter_args = adapter_args
if getattr(self,'driver',None) != None:
return
drivers_available = [driver for driver in self.drivers
@@ -950,7 +951,8 @@ class BaseAdapter(ConnectionPool):
dbpath, '%s_%s.table' % (table._db._uri_hash, tablename))
if table._dbt:
table._loggername = pjoin(dbpath, 'sql.log')
logfilename = self._adepter.adapter_args.get('logfile','sql.log')
table._loggername = pjoin(dbpath, logfilename)
logfile = self.file_open(table._loggername, 'a')
else:
logfile = None