Python distutils.log 模块,log() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用distutils.log.log()

项目:kinect-2-libras    作者:inessadl    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:pefile.pypy    作者:cloudtracer    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:ndk-python    作者:gittor    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:empyrion-python-api    作者:huhlig    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def run_command(self, command):
        """Do whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        """
        # Already been here, done that? then return silently.
        if self.have_run.get(command):
            return

        log.info("running %s", command)
        cmd_obj = self.get_command_obj(command)
        cmd_obj.ensure_finalized()
        cmd_obj.run()
        self.have_run[command] = 1


    # -- Distribution query methods ------------------------------------
项目:kinect-2-libras    作者:inessadl    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:kinect-2-libras    作者:inessadl    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:kinect-2-libras    作者:inessadl    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:kinect-2-libras    作者:inessadl    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:sslstrip-hsts-openwrt    作者:adde88    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:pefile.pypy    作者:cloudtracer    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:pefile.pypy    作者:cloudtracer    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:pefile.pypy    作者:cloudtracer    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:pefile.pypy    作者:cloudtracer    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:ouroboros    作者:pybee    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:ndk-python    作者:gittor    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:ndk-python    作者:gittor    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:ndk-python    作者:gittor    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:ndk-python    作者:gittor    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:empyrion-python-api    作者:huhlig    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:empyrion-python-api    作者:huhlig    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:empyrion-python-api    作者:huhlig    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:empyrion-python-api    作者:huhlig    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def announce(self, msg, level=log.INFO):
        log.log(level, msg)
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def dump_options(self, header=None, indent=""):
        from distutils.fancy_getopt import longopt_xlate
        if header is None:
            header = "command options for '%s':" % self.get_command_name()
        self.announce(indent + header, level=log.INFO)
        indent = indent + "  "
        for (option, _, _) in self.user_options:
            option = option.translate(longopt_xlate)
            if option[-1] == "=":
                option = option[:-1]
            value = getattr(self, option)
            self.announce(indent + "%s = %s" % (option, value),
                          level=log.INFO)
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def announce(self, msg, level=1):
        """If the current verbosity level is of greater than or equal to
        'level' print 'msg' to stdout.
        """
        log.log(level, msg)
项目:kbe_server    作者:xiaohaoppy    | 项目源码 | 文件源码
def warn(self, msg):
        log.warn("warning: %s: %s\n" %
                (self.get_command_name(), msg))