writing_20log_20files
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
writing_20log_20files [2018/03/31 13:19] – external edit 127.0.0.1 | writing_20log_20files [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
//by Richard Russell, June 2010//\\ \\ Conventionally, | //by Richard Russell, June 2010//\\ \\ Conventionally, | ||
+ | <code bb4w> | ||
DEF PROClog(A$, F$) : LOCAL F% | DEF PROClog(A$, F$) : LOCAL F% | ||
F% = OPENUP(F$) : IF F% = 0 F% = OPENOUT(F$) | F% = OPENUP(F$) : IF F% = 0 F% = OPENOUT(F$) | ||
Line 9: | Line 10: | ||
CLOSE #F% | CLOSE #F% | ||
ENDPROC | ENDPROC | ||
+ | </ | ||
Each time you want to log an event call this procedure with the first parameter being the string to write, and the second parameter being the path/name of the log file. For example: | Each time you want to log an event call this procedure with the first parameter being the string to write, and the second parameter being the path/name of the log file. For example: | ||
+ | <code bb4w> | ||
PROClog(TIME$+": | PROClog(TIME$+": | ||
+ | </ | ||
Here is an example of a log file created in this way: | Here is an example of a log file created in this way: | ||
Mon.07 Jan 2008, | Mon.07 Jan 2008, |
writing_20log_20files.1522502392.txt.gz · Last modified: 2024/01/05 00:16 (external edit)