Hi, <br> I took a look at the logging source code. getLogger checks for existing loggers with the given name and if it doesn't creates one. <br><br><br><br>def getLogger(self, name):<br> """<br>
<span style="color:rgb(255, 0, 0)"> Get a logger with the specified name (channel name), creating it</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)"> if it doesn't yet exist. This name is a dot-separated hierarchical</span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> name, such as "a", "a.b", "a.b.c" or similar.</span><br><br> If a PlaceHolder existed for the specified name [i.e. the logger<br> didn't exist but a child of it did], replace it with the created<br>
logger and fix up the parent/child references which pointed to the<br> placeholder to now point to the logger.<br> """<br> rv = None<br> _acquireLock()<br> try:<br>
if name in self.loggerDict:<br> rv = self.loggerDict[name]<br> if isinstance(rv, PlaceHolder):<br> ph = rv<br> rv = (self.loggerClass or _loggerClass)(name)<br>
rv.manager = self<br> self.loggerDict[name] = rv<br> self._fixupChildren(ph, rv)<br> self._fixupParents(rv)<br> else:<br> <span style="color:rgb(255, 0, 0)"> rv = (self.loggerClass or _loggerClass)(name)</span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> rv.manager = self</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)"> self.loggerDict[name] = rv</span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> self._fixupParents(rv)</span><br> finally:<br> _releaseLock()<br> return rv<br><br clear="all">==============================================<br>
Anand Jeyahar<br><a href="https://sites.google.com/site/aangjie/home/quotes" target="_blank">https://sites.google.com/site/</a>anandjeyahar<br>==============================================<br>The man who is really serious,<br>
with the urge to find out what truth is,<br>has no style at all. He lives only in what is.<br> ~Bruce Lee<br><br>Love is a trade with lousy accounting policies.<br> ~<a href="https://sites.google.com/site/aangjie/home/quotes" target="_blank">Aang Jie</a><br>
<br>
<br>