I passing parameter in logging like
logging.info("the before and current time are",befot,curt)
but i get error
--- Logging error ---
TypeError: not all arguments converted during string formatting
You have to format the log like below:
logging.info("the before and current time are {}".format(befot)+' {}'.format(curt))
logging.info(f"the before and current time are {befot} {curt}")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.