title: how to get request of flask in decorator logger?
body: <p>I want writing log about query strings and form data of request object in flask. </p>
  
  <p>I use decorator function for logging. </p>
  
  <p><strong>customlog.py</strong></p>
  
  <pre><code>import logging
  
  def webLog(func):
      @wraps(func)
      def newFunc(*args, **kwargs):
          logging.debug(request.url + " : " + str(request.remote_addr))
          return func(*args, **kwargs)
      return newFunc
  </code></pre>
  
  <p><strong>main.py</strong></p>
  
  <pre><code>@app.route('/')
  @customlog.webLog
  def hello_world():
      return 'Hello World!'
  </code></pre>
  
  <p>but, request in main.py, another source file.  </p>
  
  <p>How to get request object for logging?<br>
  Using parameters of decorator function?</p>