最佳答案
Currently I am logging stuff and I am using my own formatter with a custom formatTime()
:
def formatTime(self, _record, _datefmt):
t = datetime.datetime.now()
return t.strftime('%Y-%m-%d %H:%M:%S.%f')
My issue is that the microseconds, %f
, are six digits. Is there anyway to spit out less digits, like the first three digits of the microseconds?