Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

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
Namespace: EPiServer.Logging.Compatibility
Assembly: EPiServer.Framework.dll
Version: 12.0.3
Syntax
public static class LogManager : Object
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