The Log class contains logging methods for both sending (
Log
) and receiving (
Listener
) log messages.
The OAL will add to the logs by calling the
message(Level, string)
methods. The application controls how messages are logged
and which ones are logged.
Use this class in two steps:
- Implement Listener . There you can specify where to send the log (for example, by calling System.out.println or by stuffing a database). You can also filter out the ones you don't want by checking the moduleName and level in Listener.logMessage(System.DateTime, Level, string, System.Exception) .
- Specify in your application which levels of logging you want by calling
addListener(Level, Listener)
for each kind you want like this:
DOF.Log.addListener(DOF.Log.Level.DEBUG, myLogListener);
Inheritance Hierarchy
org.opendof.core.oalDOFLog
Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax
C#
public sealed class Log
The DOFLog type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() ![]() | addListener | Adds a listener to receive log messages. |
![]() | Equals | (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | isLogDebug | Returns true if anyone is listening for DEBUG level messages. |
![]() ![]() | isLogError | Returns true if anyone is listening for ERROR level messages. |
![]() ![]() | isLogFatal | Returns true if there are any registered listeners at any level. |
![]() ![]() | isLogInfo | Returns true if anyone is listening for INFO level messages. |
![]() ![]() | isLogLevel | Returns true if anyone is listening for messages at a priority level lower than or equal to the specified.
|
![]() ![]() | isLogTrace | Returns true if anyone is listening for TRACE level messages. |
![]() ![]() | isLogWarn | Returns true if anyone is listening for WARN level messages. |
![]() ![]() | message(DOFLogLevel, String) | Logs a message. |
![]() ![]() | message(String, DOFLogLevel, String) | Logs a message. |
![]() ![]() | message(DOFLogLevel, String, Exception) | Logs a message. |
![]() ![]() | message(String, DOFLogLevel, String, Exception) | Logs a message. |
![]() ![]() | removeListener | Removes a listener. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
See Also