How to use the pygelf.tls.GelfTlsHandler function in pygelf

To help you get started, we’ve selected a few pygelf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github keeprocking / pygelf / pygelf / tls.py View on Github external
def __init__(self, validate=False, ca_certs=None, **kwargs):
        super(GelfTlsHandler, self).__init__(**kwargs)

        if validate and ca_certs is None:
            raise ValueError('CA bundle file path must be specified')

        self.ca_certs = ca_certs
        self.reqs = ssl.CERT_REQUIRED if validate else ssl.CERT_NONE