You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python based templates which use flask doesn't "just work" when it comes to logging. The general:
write_debug: true
in the environmental variables flag doesn't efficiently enable logging. It is not clearly explained how to enable logging in the http/flask based python templates:
Expected Behaviour
Enabling write_debug: true flag in environmental variables and hope writing to STDERR/STDOUT would show logs when using the faas-cli logs feature. If not I would be able to find steps which will let me log from Flask based python images in the documentation or somewhere else.
Current Behaviour
Enabling write_debug: true flag in environmental variables doesn't log to STDERR/STDOUT and it is troublesome to find out how to enable logging.
Possible Solution
Better documentation of explicit steps which will make Flask/Http based python templates to "just work" when it comes to logging. We should discuss whether this could be fixed in the templates themselves, or we should go with better documentation/workaround for the logs in Python Flask.
Steps to Reproduce (for bugs)
1.Add in stack.yml for some function which uses the http python templates which use Flask:
Opening an Issue was requested as per conversation in Slack. It was troublesome to find out documentation on how exactly should logging happen in Python Flask templates.
Your Environment
FaaS-CLI version ( Full output from: faas-cli version ):
N/A
Docker version docker version (e.g. Docker 17.0.05 ):
N/A
Are you using Docker Swarm or Kubernetes (FaaS-netes)?
N/A
Operating System and version (e.g. Linux, Windows, MacOS):
N/A
Code example or link to GitHub repo or gist to reproduce problem:
N/A
I remember we had a discussion in slack what is the best approach for this. I am wondering did we reach a conclusion? I will go through logging in flask templates again just in case
My actions before raising this issue
Python based templates which use flask doesn't "just work" when it comes to logging. The general:
in the environmental variables flag doesn't efficiently enable logging. It is not clearly explained how to enable logging in the http/flask based python templates:
Expected Behaviour
Enabling
write_debug: true
flag in environmental variables and hope writing to STDERR/STDOUT would show logs when using thefaas-cli logs
feature. If not I would be able to find steps which will let me log from Flask based python images in the documentation or somewhere else.Current Behaviour
Enabling
write_debug: true
flag in environmental variables doesn't log to STDERR/STDOUT and it is troublesome to find out how to enable logging.Possible Solution
Better documentation of explicit steps which will make Flask/Http based python templates to "just work" when it comes to logging. We should discuss whether this could be fixed in the templates themselves, or we should go with better documentation/workaround for the logs in Python Flask.
Steps to Reproduce (for bugs)
1.Add in
stack.yml
for some function which uses the http python templates which use Flask:2.Write to stderr in the handler funciton:
Context
Opening an Issue was requested as per conversation in Slack. It was troublesome to find out documentation on how exactly should logging happen in Python Flask templates.
Your Environment
faas-cli version
):N/A
docker version
(e.g. Docker 17.0.05 ):N/A
N/A
N/A
N/A
Next steps
You may join Slack for community support.
The text was updated successfully, but these errors were encountered: