title: Can structured logging be done with Pythons standard library?
body: <p>I recently read about structured logging (<a href="https://stackify.com/what-is-structured-logging-and-why-developers-need-it/" rel="noreferrer">here</a>). The idea seems to be to log not by appending simple strings as a line to a logfile, but instead JSON objects. This makes it possible to analyze the logfile by automatic tools.</p>
  
  <p>Can Pythons <code>logging</code> library do structured logging? If not, is there a "mainstream" solution for it (e.g. like numpy/scipy is the mainstream solution for scientific calculations)? I found <a href="https://github.com/hynek/structlog/" rel="noreferrer"><code>structlog</code></a>, but I'm not sure how widespread it is.</p>