vaultmanager/VaultManager.py
def adjust_log_level(self):
        """
        Change the log level of all handlers if needed
        """
        self.logger.debug("Adjust log level if needed")
        if not self.parsed_arguments.verbose:
            self.logger.debug("Log level remains unchanged")
            return
        self.logger.debug("Changing log level to " + str(logging.DEBUG))
        logging.getLogger(self.base_logger_name).setLevel(logging.DEBUG)
        for handler in logging.getLogger(self.base_logger_name).handlers:
            # When upgrading to python 2.7
            # handler.setStream(sys.stderr)
            if self.parsed_arguments.verbose == 1:
                handler.setFormatter(
                    coloredlogs.ColoredFormatter(
                        self.log_format_verbose_1,
                        level_styles=self.log_level_styles,
                        field_styles=self.log_field_styles
                    )
                )
            elif self.parsed_arguments.verbose >= 2:
                handler.setLevel(logging.DEBUG)
                handler.setFormatter(
                    coloredlogs.ColoredFormatter(
                        self.log_format_verbose_2,
                        level_styles=self.log_level_styles,
                        field_styles=self.log_field_styles
                    )
                )
        self.logger.debug("Log level changed to " + str(logging.DEBUG))

        Change the log level of all handlers if needed
        
Change the log level of all handlers if needed
Change the log level of all handlers if needed
def adjust_log_level(self):
        self.logger.debug("Adjust log level if needed")
        if not self.parsed_arguments.verbose:
            self.logger.debug("Log level remains unchanged")
            return
        self.logger.debug("Changing log level to " + str(logging.DEBUG))
        logging.getLogger(self.base_logger_name).setLevel(logging.DEBUG)
        for handler in logging.getLogger(self.base_logger_name).handlers:
            if self.parsed_arguments.verbose == 1:
                handler.setFormatter(
                    coloredlogs.ColoredFormatter(
                        self.log_format_verbose_1,
                        level_styles=self.log_level_styles,
                        field_styles=self.log_field_styles
                    )
                )
            elif self.parsed_arguments.verbose >= 2:
                handler.setLevel(logging.DEBUG)
                handler.setFormatter(
                    coloredlogs.ColoredFormatter(
                        self.log_format_verbose_2,
                        level_styles=self.log_level_styles,
                        field_styles=self.log_field_styles
                    )
                )
        self.logger.debug("Log level changed to " + str(logging.DEBUG))
def adjust_log_level ( self ) : self . logger . debug ( "Adjust log level if needed" ) if not self . parsed_arguments . verbose : self . logger . debug ( "Log level remains unchanged" ) return self . logger . debug ( "Changing log level to " + str ( logging . DEBUG ) ) logging . getLogger ( self . base_logger_name ) . setLevel ( logging . DEBUG ) for handler in logging . getLogger ( self . base_logger_name ) . handlers : if self . parsed_arguments . verbose == 1 : handler . setFormatter ( coloredlogs . ColoredFormatter ( self . log_format_verbose_1 , level_styles = self . log_level_styles , field_styles = self . log_field_styles ) ) elif self . parsed_arguments . verbose >= 2 : handler . setLevel ( logging . DEBUG ) handler . setFormatter ( coloredlogs . ColoredFormatter ( self . log_format_verbose_2 , level_styles = self . log_level_styles , field_styles = self . log_field_styles ) ) self . logger . debug ( "Log level changed to " + str ( logging . DEBUG ) )
Change the log level of all handlers if needed
Change the log level of all handlers if needed
"""
        Change the log level of all handlers if needed
        """ # When upgrading to python 2.7 # handler.setStream(sys.stderr)
self