airbyte-cdk/python/airbyte_cdk/logger.py
def log_by_prefix(self, msg, default_level):
        """Custom method, which takes log level from first word of message"""
        split_line = msg.split()
        first_word = next(iter(split_line), None)
        if first_word in self.valid_log_types:
            log_level = logging.getLevelName(first_word)
            rendered_message = " ".join(split_line[1:])
        else:
            default_level = default_level if default_level in self.valid_log_types else "INFO"
            log_level = logging.getLevelName(default_level)
            rendered_message = msg
        self.log(log_level, rendered_message)
Custom method, which takes log level from first word of message
Custom method, which takes log level from first word of message
Custom method which takes log level from first word of message
def log_by_prefix(self, msg, default_level):
        split_line = msg.split()
        first_word = next(iter(split_line), None)
        if first_word in self.valid_log_types:
            log_level = logging.getLevelName(first_word)
            rendered_message = " ".join(split_line[1:])
        else:
            default_level = default_level if default_level in self.valid_log_types else "INFO"
            log_level = logging.getLevelName(default_level)
            rendered_message = msg
        self.log(log_level, rendered_message)
def log_by_prefix ( self , msg , default_level ) : split_line = msg . split ( ) first_word = next ( iter ( split_line ) , None ) if first_word in self . valid_log_types : log_level = logging . getLevelName ( first_word ) rendered_message = " " . join ( split_line [ 1 : ] ) else : default_level = default_level if default_level in self . valid_log_types else "INFO" log_level = logging . getLevelName ( default_level ) rendered_message = msg self . log ( log_level , rendered_message )
Custom method, which takes log level from first word of message
Custom method which takes log level from first word of message
"""Custom method, which takes log level from first word of message"""
self
msg
default_level