Delen via


FunctionContextLoggerExtensions.GetLogger Method

Definition

Overloads

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