Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.140.2.37 -r1.140.2.38 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 23 May 2016 10:02:03 -0000 1.140.2.37 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 May 2016 15:08:13 -0000 1.140.2.38 @@ -4796,6 +4796,16 @@ [ns_conn method] \ " [util_current_location][ns_conn url]?[ns_conn query]" \ " referred by '[get_referrer]' peer [ad_conn peeraddr] user_id [ad_conn user_id]" + if {$level in {error Error}} { + append request \n + foreach {k v} [ns_set array [ns_conn headers]] { + append request "\n $k:\t$v" + } + set data [ns_conn content] + if {[string length $data] < 2000} { + append request "\n post-data:\t$data" + } + } } ns_log $level "${message}\n[uplevel ad_get_tcl_call_stack]${request}\n" }