def before_cursor_execute(conn, cursor, statement,
parameters, context, executemany):
conn.info.setdefault('query_start_time', []).append(time.time())
- logger.debug("Start Query: %s" % statement)
+ logger.debug("Start Query: %s", statement)
@event.listens_for(Engine, "after_cursor_execute")
def after_cursor_execute(conn, cursor, statement,
parameters, context, executemany):
total = time.time() - conn.info['query_start_time'].pop(-1)
logger.debug("Query Complete!")
- logger.debug("Total Time: %f" % total)
+ logger.debug("Total Time: %f", total)
Above, we use the :meth:`.ConnectionEvents.before_cursor_execute` and
:meth:`.ConnectionEvents.after_cursor_execute` events to establish an interception
self._equated_columns[c] = self._equated_columns[col]
self.logger.info("%s will use query.get() to "
- "optimize instance loads" % self)
+ "optimize instance loads", self)
def init_class_attribute(self, mapper):
self.is_class_level = True