def log_object(to_log, logger=None, level=logging.INFO, item_max_len=64): if not to_log: return if not logger: logger = LOG content = pprint.pformat(to_log, item_max_len) for line in content.splitlines(): logger.log(level, line)
def pformat(self, item_max_len=None): data = { 'name': self.name, 'dependency_handler': self._dependency_handler, 'commands': self._commands, 'pattern': "/%s/i" % self._platform_pattern_text, } return pprint.pformat(data, item_max_len=item_max_len)
def _analyze_dependencies(self, instance_dependencies): LOG.debug("Full known dependency list: ") LOG.debug(pprint.pformat(instance_dependencies))