Create a logger for the app based on the app settings.

    This creates a logger named quart.app that has a log level based
    on the app configuration.

def create_logger(app: 'Quart') -> Logger:
    """Create a logger for the app based on the app settings.

    This creates a logger named quart.app that has a log level based
    on the app configuration.
    """
    logger = getLogger('quart.app')

    if app.debug and logger.level == NOTSET:
        logger.setLevel(DEBUG)

    logger.addHandler(default_handler)
    return logger