Somewhere in the bowels of my code I have something like:
logger = logging.getLogger('debug0.x')
The way I understand it, this should only respond when I have previously done something like:
logging.basicConfig(filename='10Nov2010a.txt',level=logging.DEBUG, name='debug0')
note that name has been defined as debug0. However, I have discovered that if do
logging.basicConfig(filename='10Nov2010a.txt',level=logging.DEBUG)
without the name keyword, then the debug0.x logger defined above reacts, and writes to the log file. I was thinking it would only react in the first case, when the logger had been named.
I'm confused.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…