@@ -488,7 +488,12 @@ sends logging output to a network socket. The base class uses a TCP socket.
488
488
.. method :: makePickle(record)
489
489
490
490
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
492
497
493
498
Note that pickles aren't completely secure. If you are concerned about
494
499
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.
499
504
500
505
.. method :: send(packet)
501
506
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.
504
513
505
514
506
515
.. method :: createSocket()
@@ -561,7 +570,8 @@ over UDP sockets.
561
570
562
571
.. method :: send(s)
563
572
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 `.
565
575
566
576
567
577
.. _syslog-handler :
0 commit comments