(self, record)
return pkt
Create message in JSON format.
Create message in JSON format.
Create message in JSON format .
def makePickle(self, record):
        """Create message in JSON format."""
        # get & cut msg
        msg = self.format(record)
        if len(msg) > self.MAXMSG:
            msg = msg[:self.MAXMSG]
        txt_level = self._level_map.get(record.levelno, "ERROR")
        hostname = _hostname
        hostaddr = _hostaddr
        jobname = _job_name
        svcname = _service_name
        pkt = self._log_template % (time.time()*1000, txt_level, skytools.quote_json(msg),
                jobname, svcname, hostname, hostaddr)
        return pkt
def makePickle ( self , record ) : # get & cut msg msg = self . format ( record ) if len ( msg ) > self . MAXMSG : msg = msg [ : self . MAXMSG ] txt_level = self . _level_map . get ( record . levelno , "ERROR" ) hostname = _hostname hostaddr = _hostaddr jobname = _job_name svcname = _service_name pkt = self . _log_template % ( time . time ( ) * 1000 , txt_level , skytools . quote_json ( msg ) , jobname , svcname , hostname , hostaddr ) return pkt