Share via


AppBuilderLoggerExtensions.CreateLogger Method (IAppBuilder, Type)

Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.

Namespace:  Microsoft.Owin.Logging
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function CreateLogger ( _
    app As IAppBuilder, _
    component As Type _
) As ILogger
'Usage
Dim app As IAppBuilder 
Dim component As Type 
Dim returnValue As ILogger 

returnValue = app.CreateLogger(component)
public static ILogger CreateLogger(
    this IAppBuilder app,
    Type component
)
[ExtensionAttribute]
public:
static ILogger^ CreateLogger(
    IAppBuilder^ app, 
    Type^ component
)
static member CreateLogger : 
        app:IAppBuilder * 
        component:Type -> ILogger
public static function CreateLogger(
    app : IAppBuilder, 
    component : Type
) : ILogger

Parameters

  • app
    Type: IAppBuilder
    The application builder.
  • component
    Type: System.Type
    The component of the logger.

Return Value

Type: Microsoft.Owin.Logging.ILogger
The created ILogger.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).

See Also

Reference

AppBuilderLoggerExtensions Class

CreateLogger Overload

Microsoft.Owin.Logging Namespace