Azure / Azure/azure-functions-python-worker
How to see logs at global level?
- Dominant language
- Python
- Stars
- 357
- Forks
- 116
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
Suppose I have a following `global_settings.py` file.
```python
logging.info("Setting global variables")
blob_name = "stgblob"
mongo_url = ""
logging.info("Global variables initialized")
```
And I import these in the `function_app.py`
```python
from global_settings import blob_name, mongo_url
... function code
```
I am unable to see the logs while running locally on vscode. Can anyone help me tell how to see them? I have tried `func host start --verbose` and settings default logging level to information in `host.json` but it didn't work.
Contributor guide
Research direction
Reproduce the local run using global_settings.py, function_app.py, host.json, and the reported func host start --verbose command. Trace when the imported module initializes and compare that with the worker's local logging output; the issue is resolved when the module's startup messages are visible during local execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100