python - Logging in custom time format -
the logging module offers automatic display off information next logging message:
logging.basicconfig(format='%(levelname)s {%(filename)s:%(lineno)s} in %(funcname)s: %(message)s', level=logging.debug) i want include seconds start of runtime of script. logging module offers msecs how can include seconds since start inside format string?
in documented logrecord attributes:
relativecreated %(relativecreated)d time in milliseconds when logrecord created, relative time logging module loaded.
Comments
Post a Comment