Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

FunctionContextLoggerExtensions.GetLogger Method

Definition

Namespace:
Microsoft.Azure.Functions.Worker
Assembly:
Microsoft.Azure.Functions.Worker.Core.dll
Package:
Microsoft.Azure.Functions.Worker.Core v1.11.0

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

Name Description
GetLogger(FunctionContext, String)

Creates a new ILogger instance for the specified FunctionContext.

GetLogger<T>(FunctionContext)

Creates a new ILogger instance using the full name of the given type.

GetLogger(FunctionContext, String)

Source:
FunctionContextLoggerExtensions.cs

Creates a new ILogger instance for the specified FunctionContext.

public static Microsoft.Extensions.Logging.ILogger GetLogger(this Microsoft.Azure.Functions.Worker.FunctionContext context, string categoryName);
static member GetLogger : Microsoft.Azure.Functions.Worker.FunctionContext * string -> Microsoft.Extensions.Logging.ILogger
<Extension()>
Public Function GetLogger (context As FunctionContext, categoryName As String) As ILogger

Parameters

context
FunctionContext

The context.

categoryName
String

The category name for messages produced by the logger.

Returns

The ILogger.

Applies to

GetLogger<T>(FunctionContext)

Source:
FunctionContextLoggerExtensions.cs

Creates a new ILogger instance using the full name of the given type.

public static Microsoft.Extensions.Logging.ILogger<T> GetLogger<T>(this Microsoft.Azure.Functions.Worker.FunctionContext context);
static member GetLogger : Microsoft.Azure.Functions.Worker.FunctionContext -> Microsoft.Extensions.Logging.ILogger<'T>
<Extension()>
Public Function GetLogger(Of T) (context As FunctionContext) As ILogger(Of T)

Type Parameters

T

Parameters

context
FunctionContext

The context.

Returns

ILogger<T>

The ILogger<TCategoryName>.

Applies to


Feedback

Was this page helpful?