DOFLog ClassOpenDOF Object Access Library
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:

  1. 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) .
  2. 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

SystemObject
  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

  NameDescription
Public methodStatic memberaddListener
Adds a listener to receive log messages.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberisLogDebug
Returns true if anyone is listening for DEBUG level messages.
Public methodStatic memberisLogError
Returns true if anyone is listening for ERROR level messages.
Public methodStatic memberisLogFatal
Returns true if there are any registered listeners at any level.
Public methodStatic memberisLogInfo
Returns true if anyone is listening for INFO level messages.
Public methodStatic memberisLogLevel
Returns true if anyone is listening for messages at a priority level lower than or equal to the specified.
Public methodStatic memberisLogTrace
Returns true if anyone is listening for TRACE level messages.
Public methodStatic memberisLogWarn
Returns true if anyone is listening for WARN level messages.
Public methodStatic membermessage(DOFLogLevel, String)
Logs a message.
Public methodStatic membermessage(String, DOFLogLevel, String)
Logs a message.
Public methodStatic membermessage(DOFLogLevel, String, Exception)
Logs a message.
Public methodStatic membermessage(String, DOFLogLevel, String, Exception)
Logs a message.
Public methodStatic memberremoveListener
Removes a listener.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also

Reference