title: Logging From a Helper Function shows poses problem of incorrect line no
body: <p>I am trying to use a helper function for python logging. But this printed the wrong line no and function name in my log file. Is there a way to get the correct line from where the helper log fn was called?</p>
  <pre><code>log_format = &quot;%(asctime)s %(lineno)d %(message)s&quot;
  </code></pre>
  <p>helper log fn Looks like</p>
  <pre><code>def helper_log(msg, test_id):
      print(test_id, msg)
      logger.info(msg, extra={&quot;test_id&quot;: test_id})
  </code></pre>
  <p>this shows the same line number in my log file, Irrespective of from where I am calling the <code>helper_log</code> function</p>