Class LogManager
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. 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
Inherited Members
Namespace: EPiServer.Logging.Compatibility
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public static class LogManager
Remarks
This class is provided to ease the transitioning from log4net. 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 EPiServer.Logging.Compatibility. 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. It is recommended to use the GetLogger() for new code.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | type |