Index: openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl,v diff -u -N -r1.51 -r1.52 --- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 26 Mar 2018 20:11:48 -0000 1.51 +++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 29 Mar 2018 08:00:01 -0000 1.52 @@ -1068,6 +1068,7 @@ {-body} {-timeout 10} {-headers ""} + {-prefix ""} {-verbose:boolean 1} request } { @@ -1090,6 +1091,21 @@ } nsv_set aa_test logindata [list peeraddr $peeraddr user_id $user_id] + # + # Construct nice log line + # + append log_line "${prefix}Run $method $request" + if {[llength $headers] > 0} { + append log_line " (headers: $headers)" + } + if {[info exists body]} { + append log_line "\n$body" + } + aa_log $log_line + + # + # Run actual request + # try { set d [ns_http run \ -timeout $timeout \ @@ -1103,7 +1119,7 @@ #ns_log notice "... [ns_set array [dict get $d headers]]" if {$verbose_p} { set ms [format %.2f [expr {[ns_time format [dict get $d time]]*1000}]] - aa_log "$method $request returns [dict get $d status] in ${ms}ms" + aa_log "${prefix}$method $request returns [dict get $d status] in ${ms}ms" } return $d }