{"id":23993,"library":"loggly-python-handler","title":"Loggly Python Handler","description":"A Python logging handler that sends log messages to Loggly's cloud-based log management service. Current version 1.0.1 (last updated 2021). Release cadence is low; no recent updates. Supports both HTTP and HTTPS endpoints with optional tags and SSL verification.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/loggly/loggly-python-handler","tags":["logging","loggly","handler","cloud"],"install":[{"cmd":"pip install loggly-python-handler","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Do not import from loggly.loggly; the correct module is loggly.handlers","wrong":"","symbol":"LogglyHandler","correct":"from loggly.handlers import LogglyHandler"}],"quickstart":{"code":"import logging\nfrom loggly.handlers import LogglyHandler\n\ntoken = os.environ.get('LOGGLY_TOKEN', 'your-customer-token')\nhandler = LogglyHandler('https://logs-01.loggly.com/inputs/' + token + '/tag/python/')\nhandler.setLevel(logging.INFO)\nlogger = logging.getLogger(__name__)\nlogger.addHandler(handler)\nlogger.info('Hello from loggly-python-handler')","lang":"python","description":"Sets up a basic Loggly handler that sends logs to the default HTTP endpoint. Replace 'your-customer-token' with your Loggly customer token."},"warnings":[{"fix":"Use loggly.handlers.LogglyHandler with a queued handler or offload logging to a separate thread.","message":"The handler uses synchronous HTTP(S) requests by default, which can block your application. Consider using async or queue-based logging in production.","severity":"gotcha","affected_versions":"all"},{"fix":"Set the environment variable PYTHONHTTPSVERIFY=0 or patch the handler to pass verify=False; otherwise use HTTPS with proper certificates.","message":"SSL verification fails in some environments (e.g., corporate proxies, outdated cert bundles). The handler has no easy way to disable SSL verification.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install dependencies: pip install requests; then import using 'from loggly.handlers import LogglyHandler'.","cause":"The package is installed but the import path is incorrect or missing dependencies (requests).","error":"ImportError: No module named 'loggly'"},{"fix":"Increase timeout by subclassing LogglyHandler or switch to a different logging library that supports async timeouts.","cause":"Network connectivity issue or Loggly endpoint unreachable. The default timeout is 2 seconds, which might be too short.","error":"TimeoutError: HTTPSConnectionPool(host='logs-01.loggly.com', port=443): Read timed out."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}