import loggingfrom datetime import datetimedef formatTime(self, record, datefmt=None): return datetime.fromtimestamp(record.created).astimezone().isoformat(timespec='milliseconds')logging.Formatter.formatTime = formatTime# Create a custom formatter with your desired time formattime_format = "%Y-%m-%d %H:%M:%S"formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(message)s', datef..