An Azure service that provides an event-driven serverless compute platform.
This is only partly expected. DEBUG being absent is normal with the default Functions configuration, but CRITICAL being downgraded to Information is not. The FunctionAppLogs schema explicitly supports Critical/LevelId 5; a host.json threshold can filter a record, but it should not change Critical into Information.
Handle the two issues separately:
- To collect Python debug logs, set the app setting PYTHON_ENABLE_DEBUG_LOGGING=1 and set the relevant host.json log level to Debug or Trace. Also check whether an AzureFunctionsJobHost__logging__logLevel__... app setting overrides the deployed host.json.
- The category Host.Function.Console is an important clue. Confirm the application is using Python’s built-in root logging functions inside the invocation. Remove custom StreamHandler/stdout redirection and avoid print for records whose severity must be preserved; console capture can lose the original LogRecord metadata before the host creates the FunctionAppLogs row.
- After restarting, emit a minimal set of five test records and query Category, Level, LevelId, Message, HostVersion. With the supported worker path, Critical should be Level=Critical/LevelId=5.
If Critical still arrives as LevelId 2, collect the Function host version, Python version, worker version, OS/plan, host.json, and a minimal reproducer, then open an Azure support case or a python-worker issue. That would be a runtime/ingestion defect, not an intentional severity mapping.
References: Python logging in Azure Functions and the FunctionAppLogs column definitions.