Interface ILog
ILog interface for loggers.
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public interface ILog
Properties
IsDebugEnabled
Gets if the debug log level is enabled.
Declaration
bool IsDebugEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsErrorEnabled
Gets if the error log level is enabled.
Declaration
bool IsErrorEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFatalEnabled
Gets if the fatal log level is enabled.
Declaration
bool IsFatalEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsInfoEnabled
Gets if the info log level is enabled.
Declaration
bool IsInfoEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsVerboseEnabled
Gets if the verbose log level is enabled.
Declaration
bool IsVerboseEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsWarnEnabled
Gets if the warn log level is enabled.
Declaration
bool IsWarnEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Tag
Gets the tag of the logger.
Declaration
string Tag { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Debug(String)
Writes a debug message to the log.
Declaration
void Debug(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Debug(String, Exception)
Writes a debug message with exception to the log.
Declaration
void Debug(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Debug(String, String)
Writes a debug message to the log.
Declaration
void Debug(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Debug(String, String, Exception)
Writes a debug message with exception to the log.
Declaration
void Debug(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |
Error(String)
Writes a error message to the log.
Declaration
void Error(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Error(String, Exception)
Writes a error message with exception to the log.
Declaration
void Error(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Error(String, String)
Writes a error message to the log.
Declaration
void Error(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Error(String, String, Exception)
Writes a error message with exception to the log.
Declaration
void Error(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |
Fatal(String)
Writes a fatal message to the log.
Declaration
void Fatal(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Fatal(String, Exception)
Writes a fatal message with exception to the log.
Declaration
void Fatal(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Fatal(String, String)
Writes a fatal message to the log.
Declaration
void Fatal(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Fatal(String, String, Exception)
Writes a fatal message with exception to the log.
Declaration
void Fatal(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |
Flush()
Ensures that all logs are written out.
Declaration
void Flush()
Info(String)
Writes a info message to the log.
Declaration
void Info(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Info(String, Exception)
Writes an info message with exception to the log.
Declaration
void Info(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Info(String, String)
Writes a info message to the log.
Declaration
void Info(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Info(String, String, Exception)
Writes an info message with exception to the log.
Declaration
void Info(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |
IsLogEnabled(LogLevel)
Returns true if the passed log level is enabled on this logger.
Declaration
bool IsLogEnabled(LogLevel level)
Parameters
Type | Name | Description |
---|---|---|
LogLevel | level | Log level to check. |
Returns
Type | Description |
---|---|
System.Boolean |
Log(LogEvent)
Writes a log event to the log.
Declaration
void Log(LogEvent logEvent)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | logEvent | The log event. |
Log(String)
Writes a generic message to the log.
Declaration
void Log(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Log(String, String)
Writes a generic message to the log.
Declaration
void Log(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Verbose(String)
Writes a verbose message to the log.
Declaration
void Verbose(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Verbose(String, Exception)
Writes a verbose message with exception to the log.
Declaration
void Verbose(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Verbose(String, String)
Writes a verbose message to the log.
Declaration
void Verbose(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Verbose(String, String, Exception)
Writes a verbose message with exception to the log.
Declaration
void Verbose(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |
Warn(String)
Writes a warn message to the log.
Declaration
void Warn(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Warn(String, Exception)
Writes a warn message with exception to the log.
Declaration
void Warn(string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The log message. |
Exception | ex | The exception. |
Warn(String, String)
Writes a warn message to the log.
Declaration
void Warn(string scope, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Warn(String, String, Exception)
Writes a warn message with exception to the log.
Declaration
void Warn(string scope, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System.String | scope | The scope of this log message. |
System.String | message | The log message. |
Exception | ex | The exception. |