IIUC, the format is set in log.py (lines 33..38 in 1.4.7):
def _add_default_handler(logger):
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(
logging.Formatter("%(asctime)s %(levelname)s %(name)s %(message)s")
)
logger.addHandler(handler)
But all my attempts to set the format to a bare '%(message)s' have failed. For example,
logging.StreamHandler(sys.stdout).setFormatter('%(message)s')
has no effect.
When developing a program in SQLAlchemy, I want to see only the query executed by engine, and these extra fields asctime, levelname and name are distracting.
There is an entire subchapter about engine logging 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., here), the logging messages are presented just the way I would like them.