MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.28k stars 21.47k forks source link

Improve Azure Functions documentation regarding ILogger<T> #113644

Open ManelBH opened 1 year ago

ManelBH commented 1 year ago

The logging documentation here: https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2

Has the following note:

For .NET class library functions, these categories assume you're using ILogger and not ILogger<T>. For more information, see the Functions ILogger documentation.

Then I go to this other link and all it has to say about ILogger<T> is:

If you choose to instead use an ILogger<T>, the category name may instead be based on T.

This isn't really helpful, what's this supposed to mean?

After some trial and error I figured out what this does is to use the fully qualified class name of T as the logging category (e.g. Foo.Bar.Baz). not only that but using a namespace as a category covers all classes under that namespace.

Please add such details in the documentation.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

AjayBathini-MSFT commented 1 year ago

@ManelBH Thanks for your feedback! We will investigate and update as appropriate.

ggailey777 commented 9 months ago

@mattchenderson can you please provide feedback on this issue? Also, I feel that this is in-proc guidance and may be different for isolated process C# functions.