dlogify
Send your Python logs and uncaught exceptions to Logify, which groups errors, classifies them with AI and delivers tickets with the full context.
Requires Python 3.10 or later. No dependencies.
Install
pip install dlogify
export LOGIFY_API_KEY=lgf_live_…
With the SDK
import logging
import dlogify
dlogify.init(service="billing")
logging.basicConfig(level=logging.INFO)
init() sends every record that passes your logging configuration, and every uncaught exception (main thread and other threads). It changes no logger's level and adds no handler, so logging.basicConfig() works before or after it and your console output stays as it was. Python's root logger shows WARNING and above unless you configure it, as above.
log = logging.getLogger("billing")
try:
charge(order_id)
except PaymentError:
log.exception("charge failed", extra={"order_id": order_id})
Keys passed with extra= become attributes; log.exception() (or exc_info=True) attaches the traceback.
You can also log directly:
dlogify.info("order placed", attributes={"order_id": order_id})
dlogify.error("charge failed", exc=err, attributes={"order_id": order_id})
dlogify.log("warning", "disk almost full") # any level name, any case
dlogify.capture_exception() # inside an except block
dlogify.flush() # before os._exit()
log() takes trace, debug, info, warn, error and fatal, and also Python's warning and critical, in any case; an unknown name logs at info.
init(capture_logging=False)orinit(capture_uncaught=False)turns a capture off.- Calls before
init()are dropped, and a secondinit()is ignored. dlogify.Client(**options)creates an independent client.dictConfigusers can name the handler instead:{"class": "dlogify.LogifyHandler"}withinit(capture_logging=False); it sends through theinit()client. With the capture left on, each record is still sent once.structlogandlogurucan write to the standardloggingmodule, which dlogify captures.
Any process: logify run
LOGIFY_API_KEY=lgf_live_… pipx run dlogify run -- python manage.py runserver
With the package installed, the command is logify run -- <cmd>. The output appears in your terminal exactly as without dlogify, and the exit code is the command's. Python tracebacks, stack traces from other languages and Go panics become single events; JSON lines are read as structured records. A non-zero exit or a death by signal is reported as one more error, except a SIGPIPE after the reader of the output went away, as in | head. Not available on Windows.
Configuration
Options passed to init() win over environment variables, which win over the defaults.
| Variable | Option | Default |
|---|---|---|
LOGIFY_API_KEY |
api_key |
Required; without it the client is disabled. |
LOGIFY_ENDPOINT |
endpoint |
https://api.dlogify.com |
LOGIFY_SERVICE |
service |
OTEL_SERVICE_NAME, then the [project] name of the nearest pyproject.toml from the working directory, then unknown_service |
LOGIFY_ENVIRONMENT |
environment |
default |
LOGIFY_RELEASE |
release |
empty |
LOGIFY_MIN_LEVEL |
min_level |
info (trace, debug, info, warn, error, fatal) |
LOGIFY_DISABLED |
disabled |
off (1 or true turns the client into a no-op) |
LOGIFY_DEBUG |
debug |
off (1 or true prints the client's diagnostics to stderr) |
Also attributes (added to every record) and max_queue_size (default 2000). disabled, debug, capture_logging and capture_uncaught take True or False; any other value is ignored with a warning.
Guarantees
- No call raises, and logging never waits for the network: records are sent by a background daemon thread, in compressed batches, with retries for up to 5 minutes.
- If the key is rejected, the client stops for the rest of the process with one warning. Redirects are not followed: one warning names the URL to put in
LOGIFY_ENDPOINT. - If the endpoint's TLS certificate cannot be verified, one warning says how to fix it: with Python from python.org on macOS, run
Install Certificates.command; behind a proxy that inspects TLS, setSSL_CERT_FILEto its CA bundle. - After an uncaught exception the client sends what is queued, then Python reports the exception as usual. At normal exit it flushes too. An exit spends at most 2 seconds on this in total.
os._exit()skips both, so calldlogify.flush()first. - Works with pre-fork servers such as gunicorn, and with
multiprocessingchildren, which flush when their target returns.Pool.terminate()(also run when awith Pool()block ends) stops workers before they flush: callpool.close()andpool.join()instead. Other worker pools that end withos._exit()should calldlogify.flush()first. - The client's own messages go to stderr, never through
logging.
What is sent
Only log records: message, level, time, logger name, the attributes you pass, the exception's type, message and traceback, and the service name, environment, release, host name and SDK version. The SDK makes no other network calls and opens no ports. Personal data is redacted by Logify on arrival.
Documentation: https://docs.dlogify.com/send-logs/python
Metadata
Release files for dlogify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dlogify-0.1.0.tar.gz | 27.9 kB | Without provenance | Details for dlogify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dlogify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dlogify-0.1.0-py3-none-any.whl |
Total release size: 66.3 kB
Release files / dlogify-0.1.0.tar.gz
| Download URL | dlogify-0.1.0.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56a6ad33e3c66ac4b221ce1b9c16d2c8cca57fecc3126ac69ad402cc2ee29a70
|
|
BLAKE2b-256 checksum How to use checksums |
2f012ee884dd9bdb1c59d25291ffaf032887f7f977df15a138589549cf088dbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dlogify-0.1.0-py3-none-any.whl
| Download URL | dlogify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1daf9888ce888c5a0352fcc7d37659fc8e220c5db250af6fe4d3475c1c33a64
|
|
BLAKE2b-256 checksum How to use checksums |
9df1c97a94f1f0656bf608cad9fa70e13ac8a3401fc9abcc04368d133fad8038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for dlogify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.