The DatagramHandler class, located in the
logging.handlers module, inherits from SocketHandler
to support sending logging messages over UDP sockets.
class DatagramHandler( |
host, port) |
-
Returns a new instance of the DatagramHandler class intended to
communicate with a remote machine whose address is given by host
and port.
-
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.
To unpickle the record at the receiving end into a LogRecord, use the
makeLogRecord() function.
-
The factory method of SocketHandler is here overridden to create
a UDP socket (socket.SOCK_DGRAM).
-
Send a pickled string to a socket.
Release 2.5.4, documentation updated on 23rd December, 2008.
See About this document... for information on suggesting changes.