MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/logging/handlers.py:861–881  ·  view source on GitHub ↗

Initialize a handler. If address is specified as a string, a UNIX socket is used. To log to a local syslogd, "SysLogHandler(address="/dev/log")" can be used. If facility is not specified, LOG_USER is used. If socktype is specified as socket.SOCK_DGRAM or soc

(self, address=('localhost', SYSLOG_UDP_PORT),
                 facility=LOG_USER, socktype=None, timeout=None)

Source from the content-addressed store, hash-verified

859 }
860
861 def __init__(self, address=('localhost', SYSLOG_UDP_PORT),
862 facility=LOG_USER, socktype=None, timeout=None):
863 """
864 Initialize a handler.
865
866 If address is specified as a string, a UNIX socket is used. To log to a
867 local syslogd, "SysLogHandler(address="/dev/log")" can be used.
868 If facility is not specified, LOG_USER is used. If socktype is
869 specified as socket.SOCK_DGRAM or socket.SOCK_STREAM, that specific
870 socket type will be used. For Unix sockets, you can also specify a
871 socktype of None, in which case socket.SOCK_DGRAM will be used, falling
872 back to socket.SOCK_STREAM.
873 """
874 logging.Handler.__init__(self)
875
876 self.address = address
877 self.facility = facility
878 self.socktype = socktype
879 self.timeout = timeout
880 self.socket = None
881 self.createSocket()
882
883 def _connect_unixsocket(self, address):
884 use_socktype = self.socktype

Callers

nothing calls this directly

Calls 2

createSocketMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected