DataSource.NET
ILogger Interface
NamespacesCaplin.LoggingILogger
Definition of the interface that will receive logging messages from a Caplin application.
Declaration Syntax
C#Visual BasicVisual C++
public interface ILogger
Public Interface ILogger
public interface class ILogger
Members
All MembersMethods



IconMemberDescription
Log(LogLevels, String, String)
Logs a single message with a given severity and category.

Log(LogLevels, String, String, array<Object>[]()[])
Logs a single message with supplied parameter values substituted into it.

Log(LogLevels, array<String>[]()[], String)
Logs a single message with a given severity and one or more categories.

Log(LogLevels, array<String>[]()[], String, array<Object>[]()[])
Logs a single message with a given severity and one or more categories, and with supplied parameter values substituted into it.

Remarks

If you want your application to log errors and other activity then the ILogger interface should be implemented.

The class that implements ILogger can also be coded to log information originating from the application itself. In this way you can use one single logger to record information originating from both your application and the Caplin application.

The ILogger interface defines one method named Log(LogLevels, String, String) with various overloads. The first argument of Log() is an enumeration which identifies the severity of the message.

The second argument is either a String identifying the category associated with the log message, or a String array that identifies several such categories.

Both the LogLevels enumeration and the category can be used to filter the messages in the implemented Log() methods, allowing the application to only log information relating to particular severities and/or associated categories.

Thread Safety

The ILogger methods are not called on a dedicated worker thread. Therefore, if any of these methods are likely to take a relatively long time to execute, they should be coded to run in a separate thread.

Assembly: DataSource.NET (Module: DataSource.NET) Version: 6.2.6.2123 (6.2.6.2123)