Azure-webjobs-sdk: Which ILogger should we use

Created on 20 Sep 2018  Â·  6Comments  Â·  Source: Azure/azure-webjobs-sdk

image

TraceWriter seems to be obsolete now, but which ILogger should we use? There are multiple in the framework.

All 6 comments

the ILogger I'm using is the one from the Microsoft.Extensions.Logging namespace, this gets DI into the AzureFunction and I typically have the following (see below) at the end of every C# function.

> ExecutionContext ctx,
> IBinder binder,
> ILogger logger)

however; I'm not sure what that would be/result in when using F#

Yes, use Microsoft.Extensions.Logging.ILogger

The issue was meant as a hint for you guys to improve the error message ;-)

I agree, the obsolete message needs to be improved. Problem is that VS intellisense finds two ILogger classes to resolve to, and the one it proposes first is the wrong one (in Microsoft.Build.Framework). The message should include the namespace.

Hugs

Mathew Charles notifications@github.com schrieb am Mo., 24. Sep. 2018,
21:43:

Closed #1922 https://github.com/Azure/azure-webjobs-sdk/issues/1922.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-webjobs-sdk/issues/1922#event-1864013757,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNAa19KwqL9TAEbKtTW99NbKp6fEdks5ueTXEgaJpZM4Wx99G
.

Was this page helpful?
0 / 5 - 0 ratings