def register_logging(app):
    if os.environ.get('APP_SETTINGS', []) in 'config.ProductionConfig':

        print("PROD LOGGING ENGAGED")

        # for heroku, just send everything to the console (instead of a file)
        # and it will forward automatically to the logging service

        # disable the existing flask handler, we are replacing it with our own
        app.logger.removeHandler(app.logger.handlers[0])

        app.logger.setLevel(logging.DEBUG)
        stdout = logging.StreamHandler(sys.stdout)
        stdout.setFormatter(logging.Formatter(
            '''--------------------------------------------------------------------------------
%(asctime)s | %(levelname)s in %(module)s [%(funcName)s] | %(user_id)s | [%(pathname)s:%(lineno)d] | %(message)s
--------------------------------------------------------------------------------'''
        ))
        app.logger.addHandler(stdout)

        # log to a file. this is commented out for heroku deploy, but kept
        # in case we need it later

        # file_handler = logging.handlers.RotatingFileHandler(log_file(app), 'a', 10000000, 10)
        # file_handler.setFormatter(logging.Formatter(
        #     '%(asctime)s | %(name)s | %(levelname)s in %(module)s [%(pathname)s:%(lineno)d]: %(message)s')
        # )
        # app.logger.addHandler(file_handler)
        # app.logger.setLevel(logging.DEBUG)

    else:
        # log to console for dev
        app.logger.setLevel(logging.DEBUG)

    return None
dataset/ETHPy150Open codeforamerica/comport/comport/app.py/register_logging/swapped operands of `in`