(self, string, level_override=None, **kwargs)
return self
Base function for add/append.
        Will first treat the string as _ConfigItemStr but will fallback to a normal str.
Base function for add/append.
        Will first treat the string as _ConfigItemStr but will fallback to a normal str.
Base function for add / append . Will first treat the string as _ConfigItemStr but will fallback to a normal str .
def _add(self, string, level_override=None, **kwargs):
        """Base function for add/append.
        Will first treat the string as _ConfigItemStr but will fallback to a normal str.
        """
        if level_override is None or not isinstance(level_override, (int, float)):
            try:
                level = string.get('level', 0)
            except AttributeError:
                level = self.level
        else:
            level = level_override
        
        #Only process string if past the required message level
        if level >= self.level:
            try:
                formatted = string.format_custom(**kwargs)
            except AttributeError:
                formatted = str(string).format(**kwargs)
            
            #Capitalise string if it contains anything
            try:
                formatted = formatted[0].upper() + formatted[1:]
            except IndexError:
                pass
            else:
                self._message_queue[level].append(formatted)
        return self
def _add ( self , string , level_override = None , * * kwargs ) : if level_override is None or not isinstance ( level_override , ( int , float ) ) : try : level = string . get ( 'level' , 0 ) except AttributeError : level = self . level else : level = level_override #Only process string if past the required message level if level >= self . level : try : formatted = string . format_custom ( * * kwargs ) except AttributeError : formatted = str ( string ) . format ( * * kwargs ) #Capitalise string if it contains anything try : formatted = formatted [ 0 ] . upper ( ) + formatted [ 1 : ] except IndexError : pass else : self . _message_queue [ level ] . append ( formatted ) return self