Azure / Azure/azure-functions-python-worker

Logging to Application Insights Include logger name

Đang mở
#1,319 7 bình luận 0 reaction 1 người được giao Được @bhagyshricompany nhận Xem trên GitHub
area:python-functions needs-attention :wave:
Ngôn ngữ chính
Python
Star
357
Fork
116
Merge trung bình
32 phút
Pull request đã merge (30 ngày)
1

Mô tả

#### Question

Ultimately, all I really want to be able to do is something like:

```python
root_logger = logger.getLogger()
child_logger = logger.getLogger("some_child_module")

root_logger.info("a root log")
child_logger.info("a child log")
```

and in application insights be able to filter only those logs for the `some_child_module` logger, etc.

I am hoping to get some guidance on how to do this. It would be great if that could be supported by default somehow but for now I would just like some approach where I can filter logs for specific modules/packages, etc. I cannot find any resources on how to do this. I see #694 which seems to indicate there isn't really a straightforward way to add additional properties through custom_dimensions

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.