removing now-unused "log" and "logEvent" functions

inlining the debug / error logging stuff until I can work out a plan with MW