Пример #1
0
 def log_callback():
     if self.connection_need_log:
         vals = {'conn': self.fileno, 'operation': operation, 'param': parameters,
                 'cost': (datetime.datetime.now() - begin_t).total_seconds() * 1000}
         perf_log.debug(
             'connection({conn})\texecute({operation})\tparam({param})\tcost({cost})'.format(
                 **vals))
Пример #2
0
 def log_callback():
     if self.connection_need_log:
         vals = {'conn': id(self.connection), 'proc': procname, 'param': parameters,
                 'cost': (datetime.datetime.now() - begin_t).total_seconds() * 1000}
         perf_log.debug('connection({conn})\tproc({proc})\tparam({param})\tcost({cost})'.format(**vals))
Пример #3
0
 def log_callback():
     if self.connection_need_log:
         vals = {'conn': self.fileno, 'cost': (datetime.datetime.now() - begin_t)}
         perf_log.debug('connection({conn})\tconnect_cost({cost})'.format(**vals))