title: How to change the format of SQLAlchemy engine 'echo' messages?
body: <p>IIUC, the format is set in log.py (lines 33..38 in 1.4.7):</p>
  <pre><code>def _add_default_handler(logger):
      handler = logging.StreamHandler(sys.stdout)
      handler.setFormatter(
          logging.Formatter(&quot;%(asctime)s %(levelname)s %(name)s %(message)s&quot;)
      )
      logger.addHandler(handler)
  </code></pre>
  <p>But all my attempts to set the format to a bare '%(message)s' have failed.  For example,</p>
  <pre><code>logging.StreamHandler(sys.stdout).setFormatter('%(message)s')
  </code></pre>
  <p>has no effect.</p>
  <p>When developing a program in SQLAlchemy, I want to see only the query executed by engine, and these extra fields <code>asctime</code>, <code>levelname</code> and <code>name</code> are distracting.</p>
  <p>There is an <a href="https://docs.sqlalchemy.org/en/14/core/engines.html#configuring-logging" rel="nofollow noreferrer">entire subchapter about engine logging</a> in SQLAlchemy documentation, but it talks only about levels and says nothing about formatting.  On the other hand, I guess changing formatting should be possible, because in SQLAlchemy tutorial (see, e.g., <a href="https://docs.sqlalchemy.org/en/14/tutorial/metadata.html#emitting-ddl-to-the-database" rel="nofollow noreferrer">here</a>), the logging messages are presented just the way I would like them.</p>