This repository was archived by the owner on Oct 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
This repository was archived by the owner on Oct 25, 2023. It is now read-only.
Can we make python buildpack log more quiet ? #174
Copy link
Copy link
Open
Description
Currently the python buildpack uses "print" to log.
For example
here
| print("App is live") |
and
here
| print(f"Sending raw result: {e}") |
As a result the console log is getting pretty messy.
For example, this is a log output when sending a null cloud event response (which the return code is 200, but logs the entire stacktrace)
Sending raw result: tuple indices must be integers or slices, not str
Traceback (most recent call last):
File "/layers/tanzu-buildpacks_python-function/invoker/pyfunc/invoke.py", line 57, in handler
headers, body = cloudevents.http.to_binary(result, data_marshaller=smart_marshaller)
File "/layers/tanzu-buildpacks_python-function/invoker-deps/install/deprecation.py", line 260, in _inner
return function(*args, **kwargs)
File "/layers/tanzu-buildpacks_python-function/invoker-deps/install/cloudevents/http/http_methods.py", line 36, in to_binary
return _moved_to_binary(event, data_marshaller)
File "/layers/tanzu-buildpacks_python-function/invoker-deps/install/cloudevents/conversion.py", line 237, in to_binary
return _to_http(
File "/layers/tanzu-buildpacks_python-function/invoker-deps/install/cloudevents/conversion.py", line 191, in _to_http
if event["specversion"] not in _obj_by_version:
and if we configure liveness/readiness probe, the log gets polluted like the following.
App is ready)
App is ready)
App is live
App is ready)
App is live
App is ready)
App is live
App is ready)
App is live
App is ready)
App is live
App is ready)
App is liveApp is ready)
App is live
App is ready)
Feature Request
Set log levels debug and info
Describe alternatives you've considered
Additional context
Metadata
Metadata
Assignees
Labels
No labels