Index: openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 10 Sep 2015 08:22:00 -0000 1.1.2.1 +++ openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 30 Nov 2015 12:43:23 -0000 1.1.2.2 @@ -10,8 +10,8 @@ # set trace "" foreach {parameter default cmd} { - TclTraceLogServerities "" {trace add execution ::ns_log enter {::tcltrace::before-ns_log}} - TclTraceSaveNsReturn 0 {trace add execution ::ns_return enter {::tcltrace::before-ns_return}} + TclTraceLogServerities "" {trace add execution ::ns_log enter {::tcltrace::before-ns_log}} + TclTraceSaveNsReturn 0 {trace add execution ::ns_return enter {::tcltrace::before-ns_return}} } { if {[::parameter::get_from_package_key \ -package_key acs-tcl \ @@ -20,6 +20,12 @@ append trace \n$cmd } } + +# +# Optionally add more traces here +# +#append trace "\ntrace add execution ::nsv_get enter {::tcltrace::before}" + if {$trace ne ""} { ns_ictl trace create $trace } 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.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 10 Sep 2015 08:22:00 -0000 1.2.2.1 +++ openacs-4/packages/acs-tcl/tcl/tcltrace-procs.tcl 30 Nov 2015 12:43:23 -0000 1.2.2.2 @@ -65,7 +65,14 @@ } else { #catch {ds_comment "ignore $severity $msg"} } - } + } + + ad_proc -private before { cmd op } { + Simple trace proc for arbitraty commands. simply reports traces to error.log. + } { + ns_log notice $cmd + } + }