I have a Azure Function app (2.0) which depends on a .NET Standard Library contained within the same solution. I understand how to use the ILogger log within the azure function itself, but I want to use the same logger to log information within the .NET Standard library as well.
I want to avoid passing the log instance within the function to another class. I would prefer to use DI. How can I accomplish this?
For example, suppose I have a function app with a single function name FunctionName1. Suppose I have a dotnet standard 2.0 library named NetStandardLibrary1 with a class named MyClass1. Within the MyClass1, I have a single method named MyMethod1. I want to log information within MyMethod1 in the same way I would when I use ILogger log within FunctionName1.