Commits

Bryan Fink  committed 34a5b43

#Fun cleanup script

  • Participants
  • Parent commits c4e386e

Comments (0)

Files changed (1)

File WebmachineDebugging.wiki

 
 The format should be such that a {{{ file:consult/1 }}} will give you a list of the lines as erlang terms.
 
+== Troubleshooting the Trace Utility ==
+
+The trace utility currently has trouble if any of your resources return a {{{ fun }}}, because of the way they serialize in the log file.  If you see errors in your webmachine log like:
+
+{{{
+{error,{badmatch,{error,{597,erl_parse,["syntax error before: ",["Fun"]]}}},
+       [{wmtrace_resource,produce_html,2},
+}}}
+
+when trying to get to the trace utility, you need to clean up those funs in your log file.  A simple way to do it is to run this command at a prompt in your traces directory:
+
+{{{
+for x in *.wmtrace; do sed "s/#Fun<.*>/wmtrace_anonymous_function_todo/" $x > $x-fixed; done
+}}}
+
+Anywhere you would have seen a {{{ fun }}}, you'll now see {{{ wmtrace_anonymous_function_todo }}}.