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.
Returns
ILogger<T>
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應