- Notifications
You must be signed in to change notification settings - Fork 107
Description
Expected Behavior
Regardless of python version, I would expect custom logs (i.e. using logging library) to be emitted.
And therefore should show up in the invocation logs, app insights tables, and in the console when running the function locally using func host start with the core tools.
Actual Behavior
When using the Python 3.13 worker, custom logs are not emitted. You only get the function start and complete logs.
When using Python 3.12, custom logs are emitted for the exact same code.
This behaviour is observed both locally (func host start) and in the deployed Azure Function.
Screenshots of deployed function App Insights
Python 3.13 (not working)
Python 3.12 (working)
Note: Expected that debug log won't appear as this is with the default log level.
Screenshots from running locally
Python 3.13 (not working)
Python 3.12 (working)
Steps to Reproduce
- Use Python runtime 3.13 on Azure Function (or create a venv with Python 3.13 locally)
- Write a function that includes
import loggingand callslogging.debug,logging.info,logging.warnorlogging.error - Deploy / start the function app
- Execute the function via its trigger
- Observe that no logs are output other than the
Executing ...andExecuted ...info logs
Relevant code being tried
import logging import azure.functions as func app = func.FunctionApp() @app.route( route="demo_logs_missing", methods=["GET"], trigger_arg_name="_req", ) def demo_logs_missing(_req: func.HttpRequest) -> func.HttpResponse: logging.debug("Example debug log") logging.info("Example info log") logging.warning("Example warning") logging.error("Example error log") return func.HttpResponse("OK")Relevant log output
requirements.txt file
azure-functionsWhere are you facing this problem?
Production Environment (explain below)
Function app name
No response
Additional Information
No response