Bryan Fink avatar Bryan Fink committed 34a5b43

#Fun cleanup script

Comments (0)

Files changed (1)

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 }}}.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.