Write trace in a log file

Posted by
Print Friendly, PDF & Email

Sometimes you need to add some program traces in a log file to understand more clearly what is going on. This especially for PHANTOM programs you don’t want to launch in INTERACTIVE mode.

 

Just add, when you want to trace:

LOG.TEXT = 'BLABLA' ; GOSUB WRITE.LOG

And at the end of your program:

WRITE.LOG:
EXECUTE CHARX(255):"k":"print '":CONVERT("'"," ",LOG.TEXT):"' >> ../bnk.run/BPT/WRITE.LOG":TODAY    
RETURN

Then under Jbase, simply enter

CT BPT WRITE.LOG<todays'date>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.