ILoggerFactory CreateLogger Method | Apache log4net™ SDK Documentation

Create a new Logger instance

Namespace: log4net.Repository.Hierarchy
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    Logger CreateLogger(
    	ILoggerRepository repository,
    	string name
    )

    Function CreateLogger (
    	repository As ILoggerRepository,
    	name As String
    ) As Logger

    Logger^ CreateLogger(
    	ILoggerRepository^ repository,
    	String^ name
    )

    abstract CreateLogger :
            repository : ILoggerRepository *
            name : string -> Logger

#### Parameters

repository
  Type: log4net.Repository
  ILoggerRepository
  The ILoggerRepository that will own the Logger.
name
  Type: System
  String
  The name of the Logger.

#### Return Value

Type: Logger
The Logger instance for the specified name.
Remarks

Create a new Logger instance with the specified name.

Called by the Hierarchy to create new named Logger instances.

If the name is null then the root logger must be returned.

See Also

#### Reference

ILoggerFactory Interface
log4net.Repository.Hierarchy Namespace