title: How to log from separate module in Flask
body: <p>I have a simple Flask app like this:</p>
  
  <pre><code>from flask import Flask
  import util
  
  APP = Flask("app")
  APP.debug = True
  
  @APP.route('/', methods=['GET'])
  def index():
      APP.logger.info("info message from index")
      util.test()
      return "hello world"
  
  if __name__ == '__main__':
      APP.run()
  </code></pre>
  
  <p>Where the util module is:</p>
  
  <pre><code>import logging
  
  logger = logging.getLogger(__name__)
  
  def test():
      logger.info("info message from util")
  </code></pre>
  
  <p>When I run only "info message from index" appears in the console.</p>
  
  <p>What is the simplest way to get the two logging messages to print to the console together, and to also both print to a log file together.</p>
  
  <p>I've tried various approaches and none have worked for me. In particular the util one never shows up.</p>