I am using python\'s logging module for logs, but needed the timestamp to include microsecond. It seems the timestamp can only get as precise as millisecond. Here\'s my test
Just completing @Luo_Hongshuai answer for python 3.7 :
format=%(asctime)s.%(msecs)06f datefmt=%Y-%m-%d %H:%M:%S