The ZITI_LOG env var is known to configure the wrapped ziti-sdk-c log level, but I’m not getting any extra output from Ziti when I run my Python program with ZITI_LOG=4. I expected to see debug level from the C SDK on stdout, and I seem to remember that’s how it worked previously.
I did
pip install openziti
in a fresh Python virtualenv and got 0.7.1. I verified that the 64bit libziti.so was auto-downloaded in the lib sub-dir of the installed package, and so that all looks normal.
I tried setting ZITI_LOG in the Python program’s env as well as exporting to child processes.
I’m using the SDK like this:
with openziti.monkeypatch():
r = requests.post(url, headers=headers, data=data)
import openziti no longer does the loading. It is deferred until the first use of openziti. This was done based on internal discussions with @sabedevops
Is this accurate @ekoby? I do think import openziti still does load the identities. I think the issue here is that ZITI_IDENTITIES wasn’t set in the environment before running the program, but rather, set inside the program after the import of the module.
Edit: Perhaps, the fact he ran into this issue as well does suggest that the pattern of loading at import time should be revisited.