loggerglue.server — Syslog server

An rfc5424/rfc5425 syslog server implementation Copyright © 2011 Evax Software <contact@evax.fr>

class loggerglue.server.SyslogHandler(request, client_address, server)

Bases: SocketServer.BaseRequestHandler

Handler for syslog connections. An instance of this class is created for each incoming connection.

Subclasses must implement handle_entry and may implement handle_error.

handle_entry(syslog_entry)

Handle an incoming syslog entry. Subclasses must implement this.

handle_error(data)

Handle an error. Subclasses can implemnt this.

Implementing this method is optional.

class loggerglue.server.SyslogServer(server_address, RequestHandlerClass, bind_and_activate=True, **ssl_args)

Bases: SocketServer.TCPServer, SocketServer.ThreadingMixIn

TCP Syslog server based on SocketServer.

arguments
server_address
Address to bind to, as a tuple (host,port). Example: (‘127.0.0.1’,1234).
RequestHandlerClass
Class to instantiate for connections. Pass a subclass of SyslogHandler.
bind_and_activate
Automatically call server_bind and server_activate.
keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, ciphers
Arguments to pass through to ssl.wrap_socket(). Providing any of these arguments enables TLS.

Previous topic

loggerglue.logger — Convenience class for logging RFC5424-formatted messages

This Page