#NEWLINE# def set_stream_logger( name = 'boto3' , level = logging . DEBUG , format_string = None ) : #NEWLINE# #INDENT# "\n    Add a stream handler for the given name and level to the logging module.\n    By default, this logs all boto3 messages to ``stdout``.\n\n        >>> import boto3\n        >>> boto3.set_stream_logger('boto3.resources', logging.INFO)\n\n    :type name: string\n    :param name: Log name\n    :type level: int\n    :param level: Logging level, e.g. ``logging.INFO``\n    :type format_string: str\n    :param format_string: Log message format\n    " #NEWLINE# if ( format_string is None ) : #NEWLINE# #INDENT# format_string = '%(asctime)s %(name)s [%(levelname)s] %(message)s' #NEWLINE# #UNINDENT# logger = logging . getLogger ( name ) #NEWLINE# logger . setLevel ( level ) #NEWLINE# handler = logging . StreamHandler ( ) #NEWLINE# handler . setLevel ( level ) #NEWLINE# formatter = logging . Formatter ( format_string ) #NEWLINE# handler . setFormatter ( formatter ) #NEWLINE# logger . addHandler ( handler )