title: how to log or print python elasticsearch-dsl query that gets invoked
body: <p>I am using <a href="https://github.com/elastic/elasticsearch-dsl-py" rel="nofollow">elasticsearch-dsl</a> for my python application to query elastic search.</p>
  
  <p>To debug what query is actually getting generated by elasticsearch-dsl library, I am unable to log or print the final query that goes to elasticsearch.</p>
  
  <p>For example, like to see the request body sent to elasticsearch like this :</p>
  
  <pre><code>{
      "query": {
          "query_string": {
             "query": "Dav*",
             "fields": ["name", "short_code"],
             "analyze_wildcard": true
          }
      }
  }
  </code></pre>
  
  <p>Tried to bring the elasticsearch log level to TRACE. Even then, unable to see the queries that got executed.</p>