title: How to print source code lines in python logger
body: <p>Is there some relatively simple way to programmatically include source code lines to python logger report. For example...</p>
  
  <pre><code>import logging
  
  def main():
      something_is_not_right = True
      logging.basicConfig(level=logging.DEBUG,
                          format=('%(filename)s: '    
                                  '%(levelname)s: '
                                  '%(funcName)s(): '
                                  '%(lineno)d:\t'
                                  '%(message)s')
                          )
  
      if something_is_not_right == True:
          logging.debug('some way to get previous line of source code here?')
  </code></pre>
  
  <p>So that output would look like this.</p>
  
  <pre><code>example.py: DEBUG: main(): 14:       if something_is_not_right == True:
  </code></pre>