Is there a way to get the current logmode in a string variable? When I write helper programs to exec into larger projects, I like to write them in a way that leaves the workfile as they found it, and I also like to allow myself the option to pass in the program option "quiet" to suppress log messages. For example:
Code: Select all
'--- Environment ---'
%original_sample = @pagesmpl
'--- Potentially change logmode ---'
if @hasoption("quiet") then
logmode -logmsg
endif
'--- Some useful thing or set of things that the program does ---'
stuff stuff stuff
'--- Clean up before returning to the calling program ---'
smpl {%original_sample}
Code: Select all
%logmode = @logmode
...
'--- Clean up before returning to the calling program ---'
logmode {%logmode}
Thanks,
-James
