def callproc(self, procname, params=None):
    'Overrides NamedTupleCursor.callproc.'
    try:
        return super(LoggingNamedTupleCursor, self).callproc(procname, params)
    finally:
        if (self.query is not None):
            logging.getLogger('dirbs.sql').log(logging.DEBUG, str(self.query, encoding='utf-8'))
Overrides NamedTupleCursor.callproc.
def callproc(self, procname, params=None):
    
    try:
        return super(LoggingNamedTupleCursor, self).callproc(procname, params)
    finally:
        if (self.query is not None):
            logging.getLogger('dirbs.sql').log(logging.DEBUG, str(self.query, encoding='utf-8'))