Class LogManager
The LogManager is used to get/set the system log manager.
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: ImageVault.Common.Lib.Logging
Assembly: ImageVault.Common.dll
Syntax
public static class LogManager
Examples
Setup log manager implementation by configuration LogManagerConfigurationSection or in code
LogManager.SystemLogManager = new Log4NetLogManager();
Properties
SystemLogManagers
Get/Sets the SystemLogManager of the LogManager
Declaration
public static IList<ILogManager> SystemLogManagers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<ILogManager> |
Methods
GetLogger(String)
Declaration
public static ILog GetLogger(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
ILog |
GetLogger(Type)
Declaration
public static ILog GetLogger(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Returns
Type | Description |
---|---|
ILog |
ResetLogManagers()
Resets the log managers to it's original configuration
Declaration
public static void ResetLogManagers()
SetLogManagers(ILogManager[])
Sets the current log managers
Declaration
public static void SetLogManagers(params ILogManager[] logManagers)
Parameters
Type | Name | Description |
---|---|---|
ILogManager[] | logManagers |
TryToGetLogManagerFromConfiguration()
Reads the configuration for the LogManager and returns the log manager there
Declaration
public static ILogManager TryToGetLogManagerFromConfiguration()
Returns
Type | Description |
---|---|
ILogManager |
Exceptions
Type | Condition |
---|---|
System.ApplicationException | If a LogManager is configured but isn't found |