FunctionContextLoggerExtensions.GetLogger Method
Definition
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
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)
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)
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.