def get_logger(name_or_func, level=LOG_LEVEL, types='<STR_LIT>', **kwargs):
if isinstance(level, str): level = getattr(logging, level.upper())<EOL>log_name = utils.func_scope(name_or_func) if callable(name_or_func) else name_or_func<EOL>logger = logging.getLogger(name=log_name)<EOL>logger.setLevel(level=level)<EOL>if not len(logger.handlers):<EOL><INDENT>formatter = logging.Formatter(fmt=kwargs.get('<STR_LIT>', LOG_FMT))<EOL>if '<STR_LIT:file>' in types and '<STR_LIT>' in kwargs:<EOL><INDENT>file_handler = logging.FileHandler(kwargs['<STR_LIT>'])<EOL>file_handler.setFormatter(fmt=formatter)<EOL>logger.addHandler(file_handler)<EOL><DEDENT>if '<STR_LIT>' in types:<EOL><INDENT>stream_handler = logging.StreamHandler()<EOL>stream_handler.setFormatter(fmt=formatter)<EOL>logger.addHandler(stream_handler)<EOL><DEDENT><DEDENT>return logger<EOL>
Generate logger

Args:
    name_or_func: logger name or current running function
    level: level of logs - debug, info, error
    types: file or stream, or both

Returns:
    logger

Examples:
    >>> get_logger(name_or_func='download_data', level='debug', types='stream')
    <Logger download_data (DEBUG)>
    >>> get_logger(name_or_func='preprocess', log_file='pre.log', types='file|stream')
    <Logger preprocess (CRITICAL)>