Class SipLogger
Class for logging debug, information, warning, error and critical messages. This class is used by the classes in the SipLib class library to log application messages. By default, this class logs all messages to a NullLogger. This means that no messages are logged.
The consumer of the SipLib class libray must configure this class by constructing an Ilogger interface and call the Log set property. It is possible to configure this class to log messages to a separate logging destination. It is also possible to configure this class to log messages to the same logging destination as the consummer (an application or another class library) of this class library. It is also possible for the consumer of this class library to use this class directly to log application messages.
Inherited Members
Namespace: SipLib.Logging
Assembly: SipLib.dll
Syntax
public static class SipLogger
Properties
| Edit this page View SourceLog
Sets the ILogger interface that this class will use to log messages.
Declaration
public static ILogger Log { set; }
Property Value
Type | Description |
---|---|
ILogger |
Methods
| Edit this page View SourceLogCritical(Exception, string)
Logs a Critical level message with an exception that occurred
Declaration
public static void LogCritical(Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that occurred |
string | message | Message to log |
LogCritical(string)
Logs a Critical level message
Declaration
public static void LogCritical(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Message to log |
LogDebug(Exception, string)
Logs a Debug level message with an exception that occurred
Declaration
public static void LogDebug(Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that occurred |
string | message | Message to log |
LogDebug(string)
Logs a Debug level message
Declaration
public static void LogDebug(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Message to log |
LogError(Exception, string)
Logs an Error level message with an exception that occurred
Declaration
public static void LogError(Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that occurred |
string | message | Message to log |
LogError(string)
Logs an Error level message
Declaration
public static void LogError(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Message to log |
LogInformation(Exception, string)
Logs an Information level message with an exception that occurred.
Declaration
public static void LogInformation(Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that occurred |
string | message | Message to log |
LogInformation(string)
Logs an Information level message.
Declaration
public static void LogInformation(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Message to log |
LogWarning(Exception, string)
Logs a Warning level message with an exception
Declaration
public static void LogWarning(Exception exception, string message)
Parameters
Type | Name | Description |
---|---|---|
Exception | exception | Exception that occurred |
string | message | Message to log |
LogWarning(string)
Logs a Warning level message
Declaration
public static void LogWarning(string message)
Parameters
Type | Name | Description |
---|---|---|
string | message | Message to log |