Log the given message. Append the last traceback if requested.
(self, msg='', level=20, traceback=False)
| 580 | return t |
| 581 | |
| 582 | def log(self, msg='', level=20, traceback=False): |
| 583 | """Log the given message. |
| 584 | |
| 585 | Append the last traceback if requested. |
| 586 | """ |
| 587 | if traceback: |
| 588 | msg += '\n' + ''.join(_traceback.format_exception(*sys.exc_info())) |
| 589 | self.publish('log', msg, level) |
| 590 | |
| 591 | |
| 592 | bus = Bus() |