How to use the logentries.le.Domain.DATA function in Logentries

To help you get started, we’ve selected a few Logentries 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 LogentriesCommunity / le_openshift / logentries / le.py View on Github external
s_entry_identifier = l['entry_identifier']
            if not s_entry_identifier:
                s_entry_identifier = config.entry_identifier
            if s_entry_identifier:
                entry_identifier = _init_entry_identifier(s_entry_identifier)
                if not entry_identifier:
                    log.error("Invalid entry separator `%s' ignored", s_entry_identifier)
            else:
                entry_identifier = None

            log.info("Following %s", log_filename)

            if log_token or config.datahub:
                transport = default_transport.get()
            elif log_key:
                endpoint = Domain.DATA
                port = 443
                use_ssl = not config.suppress_ssl
                if not use_ssl:
                    port = 80
                if config.force_domain:
                    endpoint = config.force_domain
                if config.debug_local:
                    endpoint = Domain.LOCAL
                    port = 8081
                    use_ssl = False
                preamble = 'PUT /%s/hosts/%s/%s/?realtime=1 HTTP/1.0\r\n\r\n' % (
                    config.user_key, config.agent_key, log_key)

                # Special case for HTTP PUT
                # Use plain formatter if no formatter is defined
                transport = Transport(endpoint, port, use_ssl, preamble, config.debug_transport_events,