def instance_logger(instance, echoflag=None):

    if instance.logging_name:
        name = "%s.%s.%s" % (instance.__class__.__module__,
                             instance.__class__.__name__,
                             instance.logging_name)
    else:
        name = "%s.%s" % (instance.__class__.__module__,
                          instance.__class__.__name__)

    instance._echo = echoflag

    if echoflag in (False, None):
        # if no echo setting or False, return a Logger directly,
        # avoiding overhead of filtering
        logger = logging.getLogger(name)
    else:
        # if a specified echo flag, return an EchoLogger,
        # which checks the flag, overrides normal log
        # levels by calling logger._log()
        logger = InstanceLogger(echoflag, name)

    instance.logger = logger
create a logger for an instance that implements :class:`.Identified`.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/log.py/instance_logger