IsCOBOL supports a library routine named "C$WRITELOG" that allows to add custom information to isCOBOL log file. When running with the configuration named iscobol.tracelevel set to a value greater than 0 the parameter that is sent to C$WRITELOG will be written in the log file. If running with iscobol.tracelevel=0 the statement will have no effect.
Code example:
string "before apply-discount, w-price=" w-price into logline
perform CALL-WRITELOG
CALL-WRITELOG.
call "C$WRITELOG" using logline
initialize logline
These are some lines of isCOBOL logfile created with iscobol.tracelevel=15:
Info: ENTER PARAGRAPH 'CALL-WRITELOG' [MYPROG]
Info: before apply-discount, w-price= 0000061.31
Info: EXIT PARAGRAPH 'CALL-WRITELOG' [MYPROG]
Info: ENTER PARAGRAPH 'APPLY-DISCOUNT' [MYPROG]
Info: EXIT PARAGRAPH 'APPLY-DISCOUNT' [MYPROG]
Info: ENTER PARAGRAPH 'CALL-WRITELOG' [MYPROG]
Info: after apply-discount, w-price= 0000055.17
Info: EXIT PARAGRAPH 'CALL-WRITELOG' [MYPROG]
Info: EXIT PROGRAM 'MYPROG' }
|