clusterlogger.handler.GELFTCPHandler¶
-
class
clusterlogger.handler.GELFTCPHandler(host, port=12201, debugging_fields=True, extra_fields=True, fqdn=False, localname=None, facility=None)[source]¶ Bases:
logging.handlers.SocketHandlerGraylog Extended Log Format handler
This handler uses TCP Sockets.
-
__init__(host, port=12201, debugging_fields=True, extra_fields=True, fqdn=False, localname=None, facility=None)[source]¶ Initialize a new GELF TCP Handler
Parameters: - host (
str) – The host of the graylog server. - port (
int) – The port of the graylog server (default 12201). - debugging_fields (
bool) – Send debug fields if true (the default). - extra_fields (
bool) – Send extra fields on the log record to graylog if true (the default). - fqdn (
str) – Use fully qualified domain name of localhost as source host (socket.getfqdn()). - localname (
str) – Use specified hostname as source host. - facility (
str) – Replace facility with specified value. If specified, record.name will be passed as logger parameter.
- host (
Methods
__init__(host[, port, debugging_fields, ...])Initialize a new GELF TCP Handler makePickle(record)Attributes
name-