-
Notifications
You must be signed in to change notification settings - Fork 71
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
Logging not working for synchronous path operations #11
Comments
Thanks for reporting we will discuss this feature issue and update you on the inputs soon. |
@bhagyshricompany Any update on this? |
@Qmatteo its in progress |
@bhagyshricompany any idea on the timeline? |
will update |
@bhagyshricompany "will update" ??? |
@bhagyshricompany Any update yet? |
I'm facing the same issue, I see another linked issue has a merged PR but I'm still observing the problem with fastapi |
Another "I'm facing the same issue" post, would it be possible for someone to give an update please so we don't have to guess? As Giuseppe said above I can see that Azure/azure-functions-python-worker#1171 has been merged 2 weeks ago but there has not been a core tools release yet. This issue is still open: Azure/azure-functions-python-worker#1158 so it's hard to know what the status of this is. It would be much appreciated! Without the logging on these synchronous defined functions suddenly the overall Azure Function I was building becomes impossible to monitor. |
@bhagyshricompany any update on this? The fix described in this thread Azure/azure-functions-python-worker#1158 doesn't seem to work for me |
@bhagyshricompany ANY UPDATES ON THIS, PLEASE? |
Hi, I just wanted to add a solution to this. We can fetch the current logger with getLogger() and use it accordingly. Here is a sample:
The log in get_name() shows up upon execution as intended. Note that there may be issues with tracking as handle() (non-async) is deprecated |
I have posted a workaround in the Azure/azure-functions-python-worker#1158 thread's comment |
To anyone else here, @nikie 's solution worked for me, although not out-of-the-box (makes some assumptions about the server you're using) Also found that certain types of logging didn't work for me on Azure. More here - @nikie your solution worked for me, although not out of the box, since I was using some custom middleware written a couple years ago. I also experienced some other quirks with Azure logging. I expanded upon it here - https://stackoverflow.com/a/78738009/5469472 |
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Expected/desired behavior
Expected: A line with the logged text appears in the logs (same behaviour as with async operations)
Actual: Nothing is logged.
OS and Version?
Windows 10
Versions
Python version: 3.9.10
Core Tools Version: 4.0.4704
Function Runtime Version: 4.7.3.18953
azure-functions==1.12.0
fastapi==0.88.0
The text was updated successfully, but these errors were encountered: