import logging from flask import Flask, request log = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) app = Flask(__name__) @app.route('/') def index(): log.info('Got a request from: {}'.format(request.remote_addr)) return {'msg': 'pong simple2'} if __name__ == '__main__': app.run(host='0.0.0.0', port=5001)