Azure / Azure/azure-functions-python-worker

How to see logs at global level?

オープン
#1,728 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:python-functions Needs: Triage :mag: python
主要言語
Python
スター
357
フォーク
116
平均マージ
32分
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

global_settings.py、function_app.py、host.json、および報告された func host start --verbose コマンドを使用して、ローカル実行を再現します。インポートされたモジュールが初期化されるタイミングを追跡し、それを worker のローカルログ出力と比較します。ローカル実行中にモジュールの起動メッセージが表示されれば、issue は解決です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, python
領域
backend, cloud
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。