I would just use the Save Text File function to append to a rolling log file. Se example below.
// some variables to show
x = 5;
y = 10;
z = 25;
// path to the log
logFilePath = "$TEMP/MyJmpAddin2.log";
// initialize the log in case it doesnt exist
If( !File Exists( logFilePath ), Save Text File( logFilePath, "" ) );
// function to write to the log file (with a new line character at the end)
writeToLog = Function( {str},
Save Text File(
logFilePath,
Format( Today(), "m/d/y h:m:s" ) || " - " || str || "\!N",
Mode( "append" )
)
);
writeToLog( "showing x in JMP log" );
show( x );
writeToLog( "showing y in JMP log" );
show( y );
writeToLog( "showing z in JMP log" );
show( z );
// for demonstration purposes, open the log file as plain text
Open( logFilePath, "plain text" );
Here's the resulting log file:
01/31/2018 1:56:23 PM - showing x in JMP log
01/31/2018 1:56:23 PM - showing y in JMP log
01/31/2018 1:56:23 PM - showing z in JMP log
Justin