Log 'msg % args' with the integer severity 'level'. To pass exception information, use the keyword argument exc_info with a true value, e.g. logger.log(level, "We have a %s", "mysterious problem", exc_info=True)
(self, level, msg, *args, **kwargs)
| 1576 | self.critical(msg, *args, **kwargs) |
| 1577 | |
| 1578 | def log(self, level, msg, *args, **kwargs): |
| 1579 | """ |
| 1580 | Log 'msg % args' with the integer severity 'level'. |
| 1581 | |
| 1582 | To pass exception information, use the keyword argument exc_info with |
| 1583 | a true value, e.g. |
| 1584 | |
| 1585 | logger.log(level, "We have a %s", "mysterious problem", exc_info=True) |
| 1586 | """ |
| 1587 | if not isinstance(level, int): |
| 1588 | if raiseExceptions: |
| 1589 | raise TypeError("level must be an integer") |
| 1590 | else: |
| 1591 | return |
| 1592 | if self.isEnabledFor(level): |
| 1593 | self._log(level, msg, args, **kwargs) |
| 1594 | |
| 1595 | def findCaller(self, stack_info=False, stacklevel=1): |
| 1596 | """ |