Page 1 of 1

Figuring out the log mode

Posted: Sat Apr 02, 2016 6:34 pm
by jaylamb20
Hello,

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}
I'm currently just assuming logmode was set to logmsg before the program was exec'd and just resetting to logmsg before exiting. For completeness, I'd like to be able to do something like:

Code: Select all

%logmode = @logmode ... '--- Clean up before returning to the calling program ---' logmode {%logmode}
Thoughts?

Thanks,

-James

Re: Figuring out the log mode

Posted: Sat Apr 02, 2016 9:26 pm
by EViews Gareth
No.

Re: Figuring out the log mode

Posted: Sun Apr 03, 2016 6:02 pm
by jaylamb20
No worries. Thanks Gareth.