Skip to content

Logging not working for synchronous path operations #11

@ManelBH

Description

@ManelBH

This issue is for a: (mark with an x)

- [x] bug report
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  • Define a synchronous path operation with logging:
@app.get("/sample")
def index():
    logging.info("sample")
    return {
        "info": "Try /hello/Shivani for parameterized route.",
    }
  • Start the function and call the operation with an http request

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions