aws / aws-lambda-python-runtime-interface-client

Apache License 2.0
255 stars 72 forks source link

Logging for failed import (of runtime_client) #130

Open unacceptable opened 6 months ago

unacceptable commented 6 months ago

_Issue #, if available: #22

_Description of changes: Adding logging for failed import (due to missing libraries). Tested locally in docker via https://pip.pypa.io/en/stable/topics/vcs-support/

_Target (OCI, Managed Runtime, both): Managed Runtime

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

unacceptable commented 6 months ago

I didn't see clear examples on how the logging works. This is an example error message:

CRITICAL:root:Failed to import "runtime_client" cpp file. Error loading shared library libzstd.so.1: No such file or directory (needed by /app/runtime_client.cpython-312-x86_64-linux-musl.so)

I would love to standardize this after getting some guidance.