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