Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set log level with env variable #24

Merged
merged 2 commits into from
Feb 9, 2024
Merged

feat: set log level with env variable #24

merged 2 commits into from
Feb 9, 2024

Conversation

inspirit941
Copy link
Contributor

hello. I'm currently using python knative functions with this template very well.

When I create python knative functions and try to connect it with some http webhook services that does not support cloudevent spec, it seems that I cannot handle a log comming from here;

app.logger.warning('No CloudEvent available')

so I thought it would be convenient if we can handle Flask log level by environment variable provided in knative functions.

example usage when creating knative function (func.yaml)

specVersion: 0.0.0
...
...
envs:
- name: LOG_LEVEL
  value: ERROR
annotations: {}
options: {}
labels: []
healthEndpoints:
  liveness: /health/liveness
  readiness: /health/readiness
created: 
invocation:
  format: http

@sferich888
Copy link
Collaborator

@inspirit941 I am trying to address something similar with #26 by simply exposing why the failures are happening.

@matejvasek matejvasek requested a review from lance February 9, 2024 19:04
@matejvasek
Copy link
Contributor

/approve
/lgtm

parliament/server.py Outdated Show resolved Hide resolved
@matejvasek matejvasek merged commit 86b84d8 into boson-project:main Feb 9, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants