Interface ILogger
Interface representing a loggerFactory
Namespace:Intranet.Common
Assembly:Intranet.Common.dll
Syntax
public interface ILogger
Properties
| Improve this Doc View SourceDefaultLevel
Gets or sets the default log level
Declaration
LogLevel DefaultLevel { get; set; }
Property Value
Type | Description |
---|---|
LogLevel | The default log level |
IsDebugEnabled
Gets a value indicating whether logging is enabled for the Debug level.
Declaration
bool IsDebugEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value of true if logging is enabled for the Debug level, otherwise it returns false. |
IsErrorEnabled
Gets a value indicating whether logging is enabled for the Error level.
Declaration
bool IsErrorEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value of true if logging is enabled for the Error level, otherwise it returns false. |
IsFatalEnabled
Gets a value indicating whether logging is enabled for the Fatal level.
Declaration
bool IsFatalEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value of true if logging is enabled for the Fatal level, otherwise it returns false. |
IsInfoEnabled
Gets a value indicating whether logging is enabled for the Info level.
Declaration
bool IsInfoEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value of true if logging is enabled for the Info level, otherwise it returns false. |
IsWarnEnabled
Gets a value indicating whether logging is enabled for the Warn level.
Declaration
bool IsWarnEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | A value of true if logging is enabled for the Warn level, otherwise it returns false. |
Methods
| Improve this Doc View SourceDebug(Func<String>)
Writes the diagnostic message at the Debug level.
Declaration
void Debug(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Debug(String)
Writes the diagnostic message at the Debug level.
Declaration
void Debug(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |
Error(Func<String>)
Writes the diagnostic message at the Error level.
Declaration
void Error(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Error(String)
Writes the diagnostic message at the Error level.
Declaration
void Error(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |
Fatal(Func<String>)
Writes the diagnostic message at the Fatal level.
Declaration
void Fatal(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Fatal(String)
Writes the diagnostic message at the Fatal level.
Declaration
void Fatal(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |
Info(Func<String>)
Writes the diagnostic message at the Info level.
Declaration
void Info(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Info(String)
Writes the diagnostic message at the Info level.
Declaration
void Info(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |
Log(Func<String>)
Writes the diagnostic message at the default level.
Declaration
void Log(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Log(String)
Writes the diagnostic message at the default level.
Declaration
void Log(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log. |
Log(String, LogLevel)
Writes the diagnostic message at the specified level.
Declaration
void Log(string message, LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log. |
LogLevel | level | The log level. |
Trace(Func<String>)
Writes the diagnostic message at the Trace level.
Declaration
void Trace(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Trace(String)
Writes the diagnostic message at the Trace level.
Declaration
void Trace(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |
Warn(Func<String>)
Writes the diagnostic message at the Warn level.
Declaration
void Warn(Func<string> messageFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.String> | messageFunc | A function returning message to be written. Function is not evaluated if logging is not enabled. |
Warn(String)
Writes the diagnostic message at the Warn level.
Declaration
void Warn(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to log |