Python logging: use milliseconds in time format October 7, 2022 by Tarik This should work too: logging.Formatter( fmt="%(asctime)s.%(msecs)03d", datefmt="%Y-%m-%d,%H:%M:%S" )