How do I stop logging
to create a log file when there is no log message? Currently, the logger has created an empty log when even no logging message to it. Use case is I created a FileHandler
that only log error (by logger.error("I am error!")
), but I don't want it to create a file when there is no error.
文档说通过delay=True
在第一次emit
调用时创建文件。
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.