Reputation: 326
I have an Azure functions which refers the custom dll which we have written to access the graph api calls. In the dll, we also have a NLog logger facility which helps to log the details.
Some thing like we have a NLog nuget package referred and we have a ILoggingService and LoggingService which implements the same and inside the LoggingService we have written like:
Logger logger = LogManager.GetCurrentClassLogger();
Now I want my Azure function to use this logger and log the details that we are doing it in the dll as well while running the Azure function.
Upvotes: 2
Views: 4694
Reputation: 19867
If you want to redirect the NLog output from the custom dll into the Azure-function-console.
Then I guess you can do one of 2 things:
Both cases probably requires you to setup NLog Configuration using the Config-API.
See also: NLog cloud logging with Azure function
Upvotes: 2
Reputation: 7392
You can register an ILoggerProvider
in the DI system, then use ILogger
from your function.
Upvotes: 1