Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to track down memory leak(s)
Message
From
26/09/2011 17:14:40
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01398453
Message ID:
01524766
Views:
110
>>Basic need for logging is the put the info into a file as fast as possible without any other intrusion.

< snip>

>I should be able to read and modify and delete log file while the process is running from Windows Explorer. With strtofile I can do that, with other suggested approaches I can not.
>
>I reverted to original code and only implemented write_log changes. So far so good although 1000 haven't finished yet and the log file is already 12 MB.

Thomas hit the nail on the head - you want a low-overhead logging process that writes a separate file to disk. The idea is to have a useful log file that survives even if your program crashes.

In the past I've had to fix schemes where log entries were written to a variable or property, the idea being to write it to disk at the end of processing. When the program errors or crashes, the variable/property is lost.

Although my log files rarely exceed a few Kbytes, I've had success using SET ALTERNATE TO filename ADDITIVE / SET ALTERNATE ON, then writing to the file with ?/??.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform