See if this logger has any handlers configured. Loop through all handlers for this logger and its parents in the logger hierarchy. Return True if a handler was found, else False. Stop searching up the hierarchy whenever a logger with the "propagate" attribut
(self)
| 1700 | self.handlers.remove(hdlr) |
| 1701 | |
| 1702 | def hasHandlers(self): |
| 1703 | """ |
| 1704 | See if this logger has any handlers configured. |
| 1705 | |
| 1706 | Loop through all handlers for this logger and its parents in the |
| 1707 | logger hierarchy. Return True if a handler was found, else False. |
| 1708 | Stop searching up the hierarchy whenever a logger with the "propagate" |
| 1709 | attribute set to zero is found - that will be the last logger which |
| 1710 | is checked for the existence of handlers. |
| 1711 | """ |
| 1712 | c = self |
| 1713 | rv = False |
| 1714 | while c: |
| 1715 | if c.handlers: |
| 1716 | rv = True |
| 1717 | break |
| 1718 | if not c.propagate: |
| 1719 | break |
| 1720 | else: |
| 1721 | c = c.parent |
| 1722 | return rv |
| 1723 | |
| 1724 | def callHandlers(self, record): |
| 1725 | """ |
no outgoing calls