IMPORTANT NOTICE - Apr-30-2009:
This .NET implementation of Okapi is no longer actively developed.
Instead, a NEW JAVA IMPLEMENTATION IS
AVAILABLE and is being actively developed.
The material on this Web site is for archive propose. Some applications of the old .NET implementation
(e.g. Olifant) will be maintained to some degree until they have a replacement in the Java project.
Log Interface Specification
Revision information: Version 1.1
Latest revision:
http://okapi.sourceforge.net/ILog.html
- Document Status
-
Overview
-
Defined Values
-
Methods
This document is a stable specification. Feedback about the content of this document is encouraged. Send your comments to the Okapi Framework administrator, or alternatively to post them in the Okapi Tools users group.
DISCLAIMER: Parts of the documents are generated automatically from the source code documentation of Okapi's implementation of the specification. Because the generation tool is not completely working yet, this may result in incomplete or broken text or links in this document. See the source code documentation of the interface for complete text.
The Okapi Log Interface is an object model that provides a common way of accessing a common log mechanism for the different Okapi components. It is used by nearly all components, high-level as well as low-level.
Other related specifications:
The following defined values are used with the ILog interface:
The log types are used with the
SetLog
method to specify what type of information
should be displayed or processed. The types currently defined are the following:
0 (MAINPROGRESS) | Constant value = 0. Changes the main progress indicator. |
1 (SUBPROGRESS) | Constant value = 1. Changes the secondary progress indicator. |
2 (MESSAGE) | Constant value = 2. Displays a specified message. |
3 (WARNING) | Constant value = 3. Displays a specified warning message. |
4 (ERROR) | Constant value = 4. Displays a specified error message. |
5 (USERFEEDBACK) | Constant value = 5. Checks if the user has cancelled the process. |
The Log Interface provides the following methods:
ILog.SetCallerData | Sets the implementation-specific data of the caller. |
ILog.GetCallerData |
Gets the implementation-specific data of the caller set by |
ILog.SetHelp | Sets the help access information for the log. |
ILog.InProgress | Indicates whether a task is in progress. |
ILog.IsVisible | Indicates whether the log user interface is visible. |
ILog.Show | Shows the log user interface. |
ILog.Hide | Hides the log user interface. |
ILog.SetOnTop | Switches the log user interface to be pinned on top of the screen or not. |
ILog.SetMainProgressMode | Sets the mode of the main progress indicator. |
ILog.SetSubProgressMode | Sets the mode of the secondary progress indicator. |
ILog.SetTitle | Sets the title/caption of the log. |
ILog.Clear | Clears the log. |
ILog.Cancel | Cancel the current task/process. |
ILog.GetErrorCount |
Gets the number of errors since the last call to the
|
ILog.GetWarningCount |
Gets the number of warnings since the last call to the
|
ILog.GetErrorAndWarningCount |
Gets the number of errors and warnings since the last call to the
|
ILog.SetLog | Log an entry in the log or query the user's feedback. |
ILog.Message | Logs a message. |
ILog.Warning | Logs a warning message. |
ILog.Error | Logs an error message. |
ILog.Continue | Queries if the user has cancelled the process. |
ILog.NewLine | Logs an empty line. |
ILog.BeginProcess | Starts a process. |
ILog.EndProcess | Ends the current process. |
ILog.BeginTask | Starts a task within a process. |
ILog.EndTask | Ends the current task. |
ILog.Save | Saves the current content of the log to a file. |
Sets the implementation-specific data of the caller.
Gets the implementation-specific data of the caller set by ILog.SetCallerData
.
The caller data value.
Sets the help access information for the log.
String | p_sValue | Help access information. |
Use this method to associate an help with a possible Help button in the user interface of the log. Note that not all implementation of the interface have an Help button.
The actual value of the p_sValue parameter depends on the implementation of the log. Usually it will be the full path to an help file.Indicates whether a task is in progress.
True if a task is already in progress, false if not.
Indicates whether the log user interface is visible.
True if the log is visible, false if not.
Shows the log user interface.
Use this method to show the log user interface. Note that some
implementations of the Base.ILog
interface may not provide a way
to show the user interface. For example an output to a log file.
Hides the log user interface.
Use this method to hide the log user interface. Note that some
implementations of the Base.ILog
interface may not provide a way
to hide the user interface. For example the log of a console output.
Switches the log user interface to be pinned on top of the screen or not.
System.Boolean | p_bValue | True if the user interface should be on top, false otherwise. |
True if the log was already set on top, false if it was not.
Use this method to pin or unpin the log user interface on top of the other windows.
This method may have no effect with some implementations of the log where being windows are not used (like with a console or a file output).Sets the mode of the main progress indicator.
Integer | p_nValue | The new mode to set. |
The value is one of the Base.LogProgressMode
values.
Sets the mode of the secondary progress indicator.
Integer | p_nValue | The new mode to set. |
The value is one of the Base.LogProgressMode
values.
Sets the title/caption of the log.
String | p_sValue | The text to use as title/caption for the log. |
Clears the log.
Cancel the current task/process.
System.Boolean | p_bAskConfirmation | Indicator wether a confirmation prompt should be issue before cancelling. |
Gets the number of errors since the last call to the
ILog.BeginProcess
method.
The number of errors since the last call to the
ILog.BeginProcess
method.
Gets the number of warnings since the last call to the
ILog.BeginProcess
method.
The number of warnings since the last call to the
ILog.BeginProcess
method.
Gets the number of errors and warnings since the last call to the
ILog.BeginProcess
method.
The number of errors and warnings since the last call to the
ILog.BeginProcess
method.
Log an entry in the log or query the user's feedback.
Integer | p_nType | Type of action to perform. The value must be one of
the Base.LogType values. |
Integer | p_nValue | Numeric parameter. The value depends on the type of action to perform. |
String | p_sValue | String parameter. The value depends on the type of action to perform. |
True if the process is to be continued, false if the user has cancelled the process.
Logs a message.
String | p_sText | Text of the message. |
True if the process is to be continued, false if the user has cancelled the process.
Calling this method is the same as calling Log(2, 0, p_sText)
.
Logs a warning message.
String | p_sText | Text of the warning message. |
True if the process is to be continued, false if the user has cancelled the process.
Calling this method is the same as calling Log(3, 0, p_sText)
.
Logs an error message.
String | p_sText | Text of the error message. |
True if the process is to be continued, false if the user has cancelled the process.
Calling this method is the same as calling Log(4, 0, p_sText)
.
Queries if the user has cancelled the process.
True if the process is to be continued, false if the user has cancelled the process.
Calling this method is the same as calling Log(5, 0, null)
.
Logs an empty line.
True if the process is to be continued, false if the user has cancelled the process.
Calling this method is the same as calling Log(2, 0, "")
.
Starts a process.
String | p_sText | Optional text to display. Set the text to null or empty to display nothing. |
True if the process could be started, false otherwise.
Ends the current process.
String | p_sText | Optional text to display. Set the text to null or empty to display nothing. |
Starts a task within a process.
String | p_sText | Optional text to display. Set the text to null or empty to display nothing. |
True if the task could be started, false otherwise.
Ends the current task.
String | p_sText | Optional text to display. Set the text to null or empty to display nothing. |
Saves the current content of the log to a file.
String | p_sPath | Full path of the file to save. |