def log(self, remoteIp, authToken, methodName, args, kwArgs = {},
            exception = None, latency = None, systemId = None):
        # lazy re-open the log file in case it was rotated from underneath us
        self.reopen()
        if exception:
            exception = str(exception)

        (user, entitlements) = authToken[0], authToken[2]
        logStr = cPickle.dumps((self.logFormatRevision, self.serverNameList,
                                time.time(), remoteIp, (user, entitlements),
                                methodName, args, kwArgs, exception,
                                latency, systemId))
        try:
            self.fobj.write(struct.pack("!I", len(logStr)) + logStr)
            self.fobj.flush()
        except __HOLE__, e:
            log.warning("'%s' while logging call from (%s,%s) to %s\n",
                        str(e), remoteIp, user, methodName)
dataset/ETHPy150Open sassoftware/conary/conary/repository/netrepos/reposlog.py/RepositoryCallLogger.log