-
Notifications
You must be signed in to change notification settings - Fork 466
Description
Expected Behavior
Regardless of python version, I would expect custom logs (i.e. using logging library) to be emitted.
Logs should show up in the invocation logs, 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 locally. You only get the function start and complete logs.
When using Python 3.12, custom logs are emitted for the exact same code.
Python 3.12 (working):
The expected debug log appears in the second screenshot.
FYI I have tried this with different runtime versions of the Core tools:
as well as:
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 logging and gets triggered on a cron schedule
- Start the function app
- The function gets executed according to the schedule
- Observe that no logs are output other than the Executing, received ... and Executed. The log statement itself is missing
Switching to python 3.12 and re-running the steps will show the log statement getting produced
Relevant code being tried
import logging
import azure.functions as func
app = func.FunctionApp()
@app.timer_trigger(schedule="*/15 * * * * *", arg_name="myTimer", run_on_startup=False,
use_monitor=False)
def timer_trigger_sharepoint(myTimer: func.TimerRequest) -> None:
logging.info("Timer trigger function executed at: ")Relevant log output
requirements.txt file
azure-functions
loggingWhere are you facing this problem?
Local - Core Tools
Function app name
No response
Additional Information
@hallvictoria Issue - #1760 was closed for the same/similar issue and #1745 claims to have resolved this issue. But can you confirm if this is indeed fixed and if I am missing anything?
