Addins and logging
Posted: Tue Nov 21, 2023 5:17 pm
I have a an add-in program where I want to use a log to track messages and errors:
But when the the program ends (in an error or otherwise) the log window disappears making it impossible to browse through the list of messages. Is there any way to keep it open?
One workaround I found is to launch a program from the add-in program:
And then set the logging options in run.prg:
That will keep all the logmsg text in the log for run.prg after the program completes but not the error messages because the error message all appear in the add-in log, which still disappears.
Code: Select all
logmode l
... instructions
logmsg some stuf
...instructions
One workaround I found is to launch a program from the add-in program:
Code: Select all
run .\run.prg
Code: Select all
logmode(filename=log.txt) -hideprogline error logmsg program
... do stuff