@@ -488,7 +488,12 @@ sends logging output to a network socket. The base class uses a TCP socket.
488488 .. method :: makePickle(record)
489489
490490 Pickles the record's attribute dictionary in binary format with a length
491- prefix, and returns it ready for transmission across the socket.
491+ prefix, and returns it ready for transmission across the socket. The
492+ details of this operation are equivalent to::
493+
494+ data = pickle.dumps(record_attr_dict, 1)
495+ datalen = struct.pack('>L', len(data))
496+ return datalen + data
492497
493498 Note that pickles aren't completely secure. If you are concerned about
494499 security, you may want to override this method to implement a more secure
@@ -499,8 +504,12 @@ sends logging output to a network socket. The base class uses a TCP socket.
499504
500505 .. method :: send(packet)
501506
502- Send a pickled string *packet * to the socket. This function allows for
503- partial sends which can happen when the network is busy.
507+ Send a pickled byte-string *packet * to the socket. The format of the sent
508+ byte-string is as described in the documentation for
509+ :meth: `~SocketHandler.makePickle `.
510+
511+ This function allows for partial sends, which can happen when the network
512+ is busy.
504513
505514
506515 .. method :: createSocket()
@@ -561,7 +570,8 @@ over UDP sockets.
561570
562571 .. method :: send(s)
563572
564- Send a pickled string to a socket.
573+ Send a pickled byte-string to a socket. The format of the sent byte-string
574+ is as described in the documentation for :meth: `SocketHandler.makePickle `.
565575
566576
567577.. _syslog-handler :
0 commit comments