Azure / Azure/azure-functions-python-worker

Logging to Application Insights Include logger name

Aperta
#1,319 7 commenti 0 reazioni 1 assegnatario Rivendicata da @bhagyshricompany Vedi su GitHub
area:python-functions needs-attention :wave:
Lingua principale
Python
Stelle
357
Fork
116
Merge medio
32m
PR unite (30g)
1

Descrizione

#### 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.