Aldwin Pollefeyt <aldwinald...@gmail.com> added the comment:
Can use: import logging l = logging.Logger("") h = logging.StreamHandler() f = logging.Formatter(fmt="[{filename}:{lineno}] {msg}", style="{") h.setFormatter(f) l.addHandler(h) l.info("Hello") Output: >py .\t.py [t.py:8] Hello ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37147> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com