Pickles the record in binary format with a length prefix, and returns it ready for transmission across the socket.
logging.handlers/SocketHandler.makePickle
SocketHandler.makePickle