def verbose(logger):
    """ returns the given logger if verbose is configured or it will return _muted_logger """

    if is_verbose_enabled():
        return logger

    return _muted_logger
Exemple #2
0
def verbose(logger):
    """ returns the given logger if verbose is configured or it will return _muted_logger """

    if is_verbose_enabled():
        return logger

    return _muted_logger
    def _clean_up_work_dir(self):
        if self._keep_work_dir():
            LOGGER.info(
                'All working data can be found in "{working_directory}"'.format(working_directory=self.work_dir)
            )
        else:
            if self.work_dir and exists(self.work_dir):

                if is_verbose_enabled():
                    log_directories_summary(LOGGER.debug, self.work_dir)

                LOGGER.debug('Cleaning up working directory "%s"', self.work_dir)
                rmtree(self.work_dir)

            if exists(self.error_log_file):
                LOGGER.debug('Removing error log "%s"', self.error_log_file)
                remove(self.error_log_file)
Exemple #4
0
    def _clean_up_work_dir(self):
        if self._keep_work_dir():
            LOGGER.info(
                'All working data can be found in "{working_directory}"'.
                format(working_directory=self.work_dir))
        else:
            if self.work_dir and exists(self.work_dir):

                if is_verbose_enabled():
                    log_directories_summary(LOGGER.debug, self.work_dir)

                LOGGER.debug('Cleaning up working directory "%s"',
                             self.work_dir)
                rmtree(self.work_dir)

            if exists(self.error_log_file):
                LOGGER.debug('Removing error log "%s"', self.error_log_file)
                remove(self.error_log_file)