Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc').getChild('def.ghi') is the same as logging.getLogger('abc.def.ghi') It's useful, for example, when the parent logger is named using
(self, suffix)
| 1789 | return is_enabled |
| 1790 | |
| 1791 | def getChild(self, suffix): |
| 1792 | """ |
| 1793 | Get a logger which is a descendant to this one. |
| 1794 | |
| 1795 | This is a convenience method, such that |
| 1796 | |
| 1797 | logging.getLogger('abc').getChild('def.ghi') |
| 1798 | |
| 1799 | is the same as |
| 1800 | |
| 1801 | logging.getLogger('abc.def.ghi') |
| 1802 | |
| 1803 | It's useful, for example, when the parent logger is named using |
| 1804 | __name__ rather than a literal string. |
| 1805 | """ |
| 1806 | if self.root is not self: |
| 1807 | suffix = '.'.join((self.name, suffix)) |
| 1808 | return self.manager.getLogger(suffix) |
| 1809 | |
| 1810 | def getChildren(self): |
| 1811 |