@@ -470,7 +470,12 @@ sends logging output to a network socket. The base class uses a TCP socket.
470
470
.. method :: makePickle(record)
471
471
472
472
Pickles the record's attribute dictionary in binary format with a length
473
- prefix, and returns it ready for transmission across the socket.
473
+ prefix, and returns it ready for transmission across the socket. The
474
+ details of this operation are equivalent to::
475
+
476
+ data = pickle.dumps(record_attr_dict, 1)
477
+ datalen = struct.pack('>L', len(data))
478
+ return datalen + data
474
479
475
480
Note that pickles aren't completely secure. If you are concerned about
476
481
security, you may want to override this method to implement a more secure
@@ -481,8 +486,12 @@ sends logging output to a network socket. The base class uses a TCP socket.
481
486
482
487
.. method :: send(packet)
483
488
484
- Send a pickled string *packet * to the socket. This function allows for
485
- partial sends which can happen when the network is busy.
489
+ Send a pickled byte-string *packet * to the socket. The format of the sent
490
+ byte-string is as described in the documentation for
491
+ :meth: `~SocketHandler.makePickle `.
492
+
493
+ This function allows for partial sends, which can happen when the network
494
+ is busy.
486
495
487
496
488
497
.. method :: createSocket()
@@ -543,7 +552,8 @@ over UDP sockets.
543
552
544
553
.. method :: send(s)
545
554
546
- Send a pickled string to a socket.
555
+ Send a pickled byte-string to a socket. The format of the sent byte-string
556
+ is as described in the documentation for :meth: `SocketHandler.makePickle `.
547
557
548
558
549
559
.. _syslog-handler :
0 commit comments