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