### Initialize RFC 5424 client Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Setup the client for RFC 5424 protocol over TCP. ```python import pysyslogclient client = pysyslogclient.SyslogClientRFC5424(SERVER, PORT, proto="TCP") ``` -------------------------------- ### Initialize RFC 3164 client Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Setup the client for RFC 3164 protocol over TCP. ```python import SyslogClient client = pysyslogclient.SyslogClientRFC3164(SERVER, PORT, proto="TCP") ``` -------------------------------- ### Run CLI client Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Execute the built-in CLI client using the python module flag. ```bash python -m pysyslogclient.cli ``` -------------------------------- ### Log a message with custom options Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Log a message specifying facility, severity, program name, and PID. ```python client.log("Hello syslog server", facility=pysyslogclient.FAC_SYSTEM, severity=pysyslogclient.SEV_EMERGENCY, program="Logger", pid=1) ``` -------------------------------- ### Log a simple message Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Log a message with default facility, severity, and program name. ```python client.log("Hello syslog server") ``` -------------------------------- ### Shutdown client Source: https://github.com/aboehm/pysyslogclient/blob/master/README.md Close the connection to the syslog server. ```python client.close() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.