A Python package for sending logs to LogDNA (now Mezmo). This library provides both a standard logging handler and a custom LogDNA logger class. Current version: 1.18.12. Release cadence is irregular, primarily bugfixes.
pip install logdnaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal setup for sending logs to LogDNA using LogDNAHandler. Replace LOGDNA_INGESTION_KEY with your actual key.
Upgrade to >= 1.18.10 or ensure your network config allows the 'apikey' header. The library automatically uses the new header; no code change required if using the same key parameter.
Register an atexit handler: `atexit.register(handler.flush)` or flush manually before exit.
When creating the handler, include `index_meta=True` to index metadata fields.
Avoid using this option in production. If you must, set it to True (default) to see errors.
Use `from logdna import LogDNAHandler` instead of `from logging import LogDNAHandler`.
Verify your LOGDNA_URL is correct and network allows outbound traffic to logs.logdna.com:443. If using a proxy, configure it via environment variables (e.g., HTTP_PROXY, HTTPS_PROXY).
Set LOGDNA_INGESTION_KEY environment variable to a valid key. Check that the key is not expired.