Prog_Name C(30) Event_Date D(8) Event_Time C(8) Event_Note C(254)I use this procedure to record an event.
PROCEDURE RecordEvent PARAMETERS tcProgName, tcNote IF ! USED("EventLog") USE EventLog IN 0 ENDIF INSERT INTO EventLog ; (Prog_Name, Event_Date, Event_Time, Event_Note) ; VALUES (tcProgName, DATE(), TIME(1), tcNote) USE IN EventLog RETURNWhen I want to record an event, I insert something like the following.
RecordEvent(PROGRAM(), 'Starting Up, OS: ' + OS() + ', CPU: ' + SYS(17) + ; ', Machine: ' + STRTRAN(SYS(0)," ") + ', Mem Avail: ' + ; ALLTRIM(TRANSFORM(VAL(SYS(1001)),"999,999,999,999")) + ' bytes' )or
RecordEvent(PROGRAM(), 'Entering proc') *** some code RecordEvent(PROGRAM(), 'Exiting proc')>I know that the full blown version of what I want to do is called an audit trail. What I would like is a simple method for tracking program flow in a small section of the code to see if code is being executed or not (in this case if tables are update or if a roll back occurs). I quess the closes thing I can think of is a code profiler which if I understand VFP correctly is not available at run time. That is why I wanted to create a text file for a short time. Textmerge way be the way to go.