我需要一种方法来检索python 3.4.2 Logger对象“ mylogger”指向的“文件名”。
for i in range(0, len(mylogger.handlers)):
try:
print(mylogger.handlers[i].baseFilename)
except AttributeError:
print('no to file')
mylogger
can send logs to several files as well to stdout or to an email address
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.