Skip to content

Class: StatusAsciiLog

Properties | Events | Methods | Index of Classes

Used for logging status and error reports from unattended (batch) processes to an ascii file

Hierarchy

cObject > StatusAsciiLog

Show full hierarchy and direct subclasses

Library: Common Class Library

Package: statALog.pkg

Description

StatusAsciiLog is used for logging status and error reports from unattended (batch) processes to an ascii file. This is a prototype status logging class that can be used for adding status log entries. It uses an ascii file to write the log values. For this reason this is not a multi-user solution. This package is handy if you want to test your programs without using a database file.

Use StatALog.Pkg
:
Object oStatusLog is a StatusAsciiLog
End_Object

Batch Process objects such as BusinessProcess and BasicReport contain an interface that uses this object. The batch process is connected to the status log object bet setting the Status_log_id property in the batch object

object name is a { BusinessProcess | BasicReport }
    Set Status_Log_Id to Status_Log

If no properties are set this will write the log information out to a file named ".\DFLog.txt".

This class is provided as an example of a simple example of status logging. You are encouraged to create you own sub-classes or replacements for this class. Batch process objects that use objects based on this class must use the standard interface created to use this class. The two public messages that must be supported are Log_Status and Log_Clear.

Status Logging in Processes

Status logging refers to a defined interface for sending information to a status-logging object. Various properties and methods are created within a BusinessProcess class (BPOs) to support easy status logging. The program must set the property Status_log_Id to the object ID of the status-log object. It can then set the property Status_log_State to true. When true, a log entry is sent when a BPO process is started, a BPO process is ended, and when an error occurs. Additional status lines can be sent by sending the message log_status passing the text to be logged.

The actual interface to the status-log object consists of two public messages: Log_Status and Log_Clear. It is the status-log object's responsibility to do something useful with these messages. The prototype log object provided with DataFlex (found in StatLog.pkg, StatALog.pkg and StatFLog.pkg) writes a log entry consisting of date, time, and comment to a simple data file. It is expected that you may wish to expand upon this logging process by extending the data file (e.g., adding a user name), its indexes, by moving the log file to another file-list entry, or by expanding the interface (e.g., add ability to review the log, sort by user name). The log object was purposely kept simple. The database status logging class StatusdbLog, does however provide basic multi-user logging.

See Also

StatusDbLog | BusinessProcess | BasicReport