How to use the logentries.le.Domain.LOCAL 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
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,
                                      (config.proxy_type, config.proxy_url, config.proxy_port))
                transports.append(transport)
                # Default formatter is plain
                if not entry_formatter:
                    entry_formatter = formats.get_formatter('plain', config.hostname, log_name, log_token)
            else:
                continue