Python logging: use milliseconds in time format

This should work too:

logging.Formatter(
    fmt="%(asctime)s.%(msecs)03d",
    datefmt="%Y-%m-%d,%H:%M:%S"
)

Leave a Comment