human
Complete the below
def configure_logging(app):

    ''''Configures logging.'
    '''
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    logs_folder = os.path.join(app.root_path, os.pardir, 'logs')
    from logging.handlers import SMTPHandler
    formatter = logging.Formatter('%(asctime)s    %(levelname)s:    %(message)s    [in    %(pathname)s:%(lineno)d]')
    info_log = os.path.join(logs_folder, app.config['INFO_LOG'])
    info_file_handler = logging.handlers.RotatingFileHandler(info_log, maxBytes=100000, backupCount=10)
    info_file_handler.setLevel(logging.INFO)
    info_file_handler.setFormatter(formatter)
    app.logger.addHandler(info_file_handler)
    error_log = os.path.join(logs_folder, app.config['ERROR_LOG'])
    error_file_handler = logging.handlers.RotatingFileHandler(error_log, maxBytes=100000, backupCount=10)
    error_file_handler.setLevel(logging.ERROR)
    error_file_handler.setFormatter(formatter)
    app.logger.addHandler(error_file_handler)
    if app.config['SEND_LOGS']:
        mail_handler = SMTPHandler(app.config['MAIL_SERVER'], app.config['MAIL_DEFAULT_SENDER'], app.config['ADMINS'], 'application    error,    no    admins    specified', (app.config['MAIL_USERNAME'], app.config['MAIL_PASSWORD']))
        mail_handler.setLevel(logging.ERROR)
        mail_handler.setFormatter(formatter)
        app.logger.addHandler(mail_handler)
    if app.config['SQLALCHEMY_ECHO']:
        @event.listens_for(Engine, 'before_cursor_execute')
        def before_cursor_execute(conn, cursor, statement, parameters, context, executemany):
            conn.info.setdefault('query_start_time', []).append(time.time())
        @event.listens_for(Engine, 'after_cursor_execute')
        def after_cursor_execute(conn, cursor, statement, parameters, context, executemany):
            total = (time.time() - conn.info['query_start_time'].pop((-1)))
            app.logger.debug('Total    Time:    %f', total)