示例#1
0
    def log(self, level, fstring):
        """
        Log to the flux logging facility

        :param level: A syslog log-level, check the syslog module for possible
               values
        :param fstring: A string to log, C-style formatting is *not* supported
        """
        # Short-circuited because variadics can't be wrapped cleanly
        if isinstance(fstring, six.text_type):
            fstring = fstring.encode("utf-8")
        lib.flux_log(self.handle, level, fstring)
示例#2
0
    def log(self, level, fstring):
        """
        Log to the flux logging facility

        :param level: A syslog log-level, check the syslog module for possible
               values
        :param fstring: A string to log, C-style formatting is *not* supported
        """
        # Short-circuited because variadics can't be wrapped cleanly
        if isinstance(fstring, six.text_type):
            fstring = fstring.encode("utf-8")
        lib.flux_log(self.handle, level, fstring)