Get a logger with the specified name (channel name), creating it if it doesn't yet exist. This name is a dot-separated hierarchical name, such as "a", "a.b", "a.b.c" or similar. If a PlaceHolder existed for the specified name [i.e. the logger didn't exist bu
(self, name)
| 1363 | self._disable = _checkLevel(value) |
| 1364 | |
| 1365 | def getLogger(self, name): |
| 1366 | """ |
| 1367 | Get a logger with the specified name (channel name), creating it |
| 1368 | if it doesn't yet exist. This name is a dot-separated hierarchical |
| 1369 | name, such as "a", "a.b", "a.b.c" or similar. |
| 1370 | |
| 1371 | If a PlaceHolder existed for the specified name [i.e. the logger |
| 1372 | didn't exist but a child of it did], replace it with the created |
| 1373 | logger and fix up the parent/child references which pointed to the |
| 1374 | placeholder to now point to the logger. |
| 1375 | """ |
| 1376 | rv = None |
| 1377 | if not isinstance(name, str): |
| 1378 | raise TypeError('A logger name must be a string') |
| 1379 | with _lock: |
| 1380 | if name in self.loggerDict: |
| 1381 | rv = self.loggerDict[name] |
| 1382 | if isinstance(rv, PlaceHolder): |
| 1383 | ph = rv |
| 1384 | rv = (self.loggerClass or _loggerClass)(name) |
| 1385 | rv.manager = self |
| 1386 | self.loggerDict[name] = rv |
| 1387 | self._fixupChildren(ph, rv) |
| 1388 | self._fixupParents(rv) |
| 1389 | else: |
| 1390 | rv = (self.loggerClass or _loggerClass)(name) |
| 1391 | rv.manager = self |
| 1392 | self.loggerDict[name] = rv |
| 1393 | self._fixupParents(rv) |
| 1394 | return rv |
| 1395 | |
| 1396 | def setLoggerClass(self, klass): |
| 1397 | """ |