Handle an error during logging. An error has occurred during logging. Most likely cause - connection lost. Close the socket so that we can retry on the next event.
(self, record)
| 669 | return slen + s |
| 670 | |
| 671 | def handleError(self, record): |
| 672 | """ |
| 673 | Handle an error during logging. |
| 674 | |
| 675 | An error has occurred during logging. Most likely cause - |
| 676 | connection lost. Close the socket so that we can retry on the |
| 677 | next event. |
| 678 | """ |
| 679 | if self.closeOnError and self.sock: |
| 680 | self.sock.close() |
| 681 | self.sock = None #try to reconnect next time |
| 682 | else: |
| 683 | logging.Handler.handleError(self, record) |
| 684 | |
| 685 | def emit(self, record): |
| 686 | """ |