Class Log
Defines a abstract implementation of the ILog interface
Inheritance
Implements
Inherited Members
Namespace: ImageVault.Common.Lib.Logging
Assembly: ImageVault.Common.dll
Syntax
public class Log : ILog
Constructors
Log(String)
Creates a Log instance for the specified name
Declaration
public Log(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Log(Type)
Creates a Log instance for the specified type
Declaration
public Log(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type |
Properties
IsCriticalEnabled
Declaration
public bool IsCriticalEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDebugEnabled
Declaration
public bool IsDebugEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsErrorEnabled
Declaration
public bool IsErrorEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInfoEnabled
Declaration
public bool IsInfoEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsVerboseEnabled
Gets the IsVerboseEnabled of the Log4NetLog
Declaration
public bool IsVerboseEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsWarnEnabled
Declaration
public bool IsWarnEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Critical(Func<Object>, Exception)
Logs a message object with the Critical level. Only invokes the message func if Critical is enabled
Declaration
public void Critical(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Critical(Object)
Logs a message object with the Critical level.
Declaration
public void Critical(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Critical(Object, Exception)
Logs a message object with the Critical level.
Declaration
public void Critical(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
System.Exception | exception | The System.Exception to log |
Debug(Func<Object>, Exception)
Logs a message object with the Debug level. Only invokes the message func if debug is enabled
Declaration
public void Debug(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Debug(Object)
Logs a message object with the Debug level.
Declaration
public void Debug(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Debug(Object, Exception)
Logs a message object with the Debug level.
Declaration
public void Debug(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
System.Exception | exception | The System.Exception to log |
Error(Func<Object>, Exception)
Logs a message object with the Error level. Only invokes the message func if Error is enabled
Declaration
public void Error(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Error(Object)
Logs a message object with the Error level.
Declaration
public void Error(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Error(Object, Exception)
Logs a message object with the Error level.
Declaration
public void Error(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
System.Exception | exception | The System.Exception to log |
Info(Func<Object>, Exception)
Logs a message object with the Info level. Only invokes the message func if Info is enabled
Declaration
public void Info(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Info(Object)
Logs a message object with the Info level.
Declaration
public void Info(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Info(Object, Exception)
Logs a message with the Info level
Declaration
public void Info(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | |
System.Exception | exception |
IsEnabled(Level)
Checks if the supplied logging level is enabled
Declaration
public bool IsEnabled(Level level)
Parameters
Type | Name | Description |
---|---|---|
Level | level | The level to check |
Returns
Type | Description |
---|---|
System.Boolean |
Verbose(Func<Object>, Exception)
Logs a message object with the Verbose level. Only invokes the message func if Verbose is enabled
Declaration
public void Verbose(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Verbose(Object)
Logs a message object with the Verbose level.
Declaration
public void Verbose(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Verbose(Object, Exception)
Logs a message object with the Verbose level.
Declaration
public void Verbose(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | |
System.Exception | exception |
Warn(Func<Object>, Exception)
Logs a message object with the Warn level. Only invokes the message func if Warn is enabled
Declaration
public void Warn(Func<object> messageFunc, Exception exception = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object> | messageFunc | The function that returns the message object to log. |
System.Exception | exception | The System.Exception to log |
Warn(Object)
Logs a message object with the Warn level.
Declaration
public void Warn(object message)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
Warn(Object, Exception)
Logs a message object with the Warn level.
Declaration
public void Warn(object message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
System.Object | message | The message object to log. |
System.Exception | exception | The exception to log, including its stack trace. |
Explicit Interface Implementations
ILog.Log(Level, String, Exception)
Declaration
void ILog.Log(Level level, string message, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Level | level | |
System.String | message | |
System.Exception | exception |