The SocketHandler class, located in the
logging.handlers module, sends logging output to a network
socket. The base class uses a TCP socket.
Returns a new instance of the SocketHandler class intended to
communicate with a remote machine whose address is given by host
Closes the socket.
Pickles the record's attribute dictionary and writes it to the socket in
binary format. If there is an error with the socket, silently drops the
packet. If the connection was previously lost, re-establishes the connection.
To unpickle the record at the receiving end into a LogRecord, use the
Handles an error which has occurred during emit(). The
most likely cause is a lost connection. Closes the socket so that
we can retry on the next event.
This is a factory method which allows subclasses to define the precise
type of socket they want. The default implementation creates a TCP
Pickles the record's attribute dictionary in binary format with a length
prefix, and returns it ready for transmission across the socket.
Send a pickled string packet to the socket. This function allows
for partial sends which can happen when the network is busy.
See About this document... for information on suggesting changes.