Class LogManager

Compatibility class that mimics some aspects of the LogManager class in log4net. Responsible for creating new ILog instances that can be used for logging.

Inheritance
System.Object
LogManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Logging.Compatibility
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public static class LogManager
Remarks

This class is provided to ease the transitioning from log4net and will be removed in a future release. It is recommended to use the LogManager for new code.

Methods

GetLogger(String)

Gets a ILog instance for the provided type.

Declaration
public static ILog GetLogger(string name)
Parameters
Type Name Description
System.String name

The name of the logger.

Returns
Type Description
ILog

A new ILog instance.

Remarks

This class is provided to ease the transitioning from log4net and will be removed in a future release. It is recommended to use the GetLogger() for new code.

Exceptions
Type Condition
System.ArgumentNullException

name

GetLogger(Type)

Gets a ILog instance for the provided type.

Declaration
public static ILog GetLogger(Type type)
Parameters
Type Name Description
System.Type type

The type that the logger should be created for.

Returns
Type Description
ILog

A new ILog instance.

Remarks

This class is provided to ease the transitioning from log4net and will be removed in a future release. It is recommended to use the GetLogger() for new code.

Exceptions
Type Condition
System.ArgumentNullException

type