feat(mpeinit): dump session_info to the log when debug is on
Guard on the table existing, since a service called directly, or by a client that predates this change, will not send one.
This commit is contained in:
1 parent
50282f2ddb
commit
fbd77a5334
1 file changed
+21
@@ -120,4 +120,25 @@ run;
|
||||
%let sasjs_mdebug=1;
|
||||
%end;
|
||||
|
||||
/**
|
||||
* Dump the session context when debug is on. The client sends a single-row
|
||||
* `session_info` table with every service call (see SasService.request) -
|
||||
* this shows exactly what arrived, which is the quickest way to diagnose a
|
||||
* hook that is not behaving as expected. Guarded on the table existing,
|
||||
* since a service called directly, or by an older client, will not have it.
|
||||
*
|
||||
* The values are client supplied, so they are hints only - never treat them
|
||||
* as a security boundary.
|
||||
*/
|
||||
%if "&sasjs_mdebug"="1" %then %do;
|
||||
%if %sysfunc(exist(work.session_info)) %then %do;
|
||||
data _null_;
|
||||
set work.session_info;
|
||||
putlog "NOTE: &sysmacroname: work.session_info:";
|
||||
putlog (_all_)(=);
|
||||
run;
|
||||
%end;
|
||||
%else %put NOTE: &sysmacroname: no work.session_info on this request;
|
||||
%end;
|
||||
|
||||
%mend mpeinit;
|
||||
Reference in new issue
Block a user