How to use the txaio.interfaces.log_levels.index function in txaio

To help you get started, we’ve selected a few txaio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github crossbario / txaio / txaio / tx.py View on Github external
def _acceptable_level(self, level):
        if self._levels is None:
            target_level = log_levels.index(_log_level)
            self._levels = [
                self.to_tx[lvl]
                for lvl in log_levels
                if log_levels.index(lvl) <= target_level and lvl != "none"
            ]
        return level in self._levels
github Kitware / VTK / ThirdParty / txaio / vtktxaio / txaio / tx.py View on Github external
def _acceptable_level(self, level):
        if self._levels is None:
            target_level = log_levels.index(_log_level)
            self._levels = [
                self.to_tx[lvl]
                for lvl in log_levels
                if log_levels.index(lvl) <= target_level and lvl != "none"
            ]
        return level in self._levels
github crossbario / txaio / txaio / tx.py View on Github external
def _acceptable_level(self, level):
        if self._levels is None:
            target_level = log_levels.index(_log_level)
            self._levels = [
                self.to_tx[lvl]
                for lvl in log_levels
                if log_levels.index(lvl) <= target_level and lvl != "none"
            ]
        return level in self._levels
github technologiescollege / Blockly-rduino-communication / scripts_XP / Lib / site-packages / txaio / tx.py View on Github external
def _set_log_level(self, level):
        # up to the desired level, we don't do anything, as we're a
        # "real" Twisted new-logger; for methods *after* the desired
        # level, we bind to the no_op method
        desired_index = log_levels.index(level)

        for (idx, name) in enumerate(log_levels):
            if name == 'none':
                continue

            if idx > desired_index:
                current = getattr(self, name, None)
                if not current == _no_op or current is None:
                    setattr(self, name, _no_op)
                if name == 'error':
                    setattr(self, 'failure', _no_op)

            else:
                if getattr(self, name, None) in (_no_op, None):

                    if name == 'trace':
github Kitware / VTK / ThirdParty / txaio / vtktxaio / txaio / tx.py View on Github external
def _set_log_level(self, level):
        # up to the desired level, we don't do anything, as we're a
        # "real" Twisted new-logger; for methods *after* the desired
        # level, we bind to the no_op method
        desired_index = log_levels.index(level)

        for (idx, name) in enumerate(log_levels):
            if name == 'none':
                continue

            if idx > desired_index:
                current = getattr(self, name, None)
                if not current == _no_op or current is None:
                    setattr(self, name, _no_op)
                if name == 'error':
                    setattr(self, 'failure', _no_op)

            else:
                if getattr(self, name, None) in (_no_op, None):

                    if name == 'trace':