title: Is this the right way of logging in Flask?
body: <p>I have written a Flask App as follows:</p>
  
  <pre><code>import logging
  from flask import Flask, jsonify
  from mongo import Mongo
  app = Flask(__name__)
  app.config.from_object("config.ProductionConfig")
  
  
  # routes to a particular change and patch number
  @app.route("/&lt;project&gt;/")
  def home(project):
  
      app.logger.info('testing info log')
      Mongo_obj = Mongo(ip=app.config["DB_HOST"], port=app.config["DB_PORT"],
                        username=app.config["DB_USERNAME"],
  
  .....................
  if __name__ == '__main__':
      app.run(host = '0.0.0.0', port = '5000')
  </code></pre>
  
  <p>Now, the problem I face is, when I look at the logs of the Flask application, all I see is the following:</p>
  
  <pre><code>* Serving Flask app "service" (lazy loading)
   * Environment: production
     WARNING: This is a development server. Do not use it in a production deployment.
     Use a production WSGI server instead.
   * Debug mode: off
   * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
  172.16.40.189 - - [01/Oct/2019 14:44:29] "GET /abc HTTP/1.1" 200 -
  172.16.11.231 - - [01/Oct/2019 14:44:29] "GET /abc HTTP/1.1" 200 -
  ............
  </code></pre>
  
  <p>Is there something specific that needs to be done in order to see the log message? Do I need to run the Flask App in debug mode?</p>