Index: openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 7 Aug 2017 23:48:00 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 12 Dec 2017 10:27:11 -0000 1.4 @@ -73,10 +73,22 @@ } } - ad_proc -private before { cmd op } { - Simple trace proc for arbitraty commands. simply reports traces to error.log. + ad_proc -private before { + {-details:boolean false} + cmd + op } { - ns_log notice "trace: $cmd" + + Generic trace proc for arbitraty commands. Simply reports + calls to function (optionally with full context) to the error.log. + + @param details when set, use ad_log for reporting with full context + @param cmd the full command as executed by Tcl + @param op the trace operation + + } { + set cmd [expr {$details_p ? "ad_log" : "ns_log"}] + $cmd notice "trace: $cmd" } }