Add optional object logging to logDebug

This is just a small change so that logDebug mirrors other log levels, and allows for an optional object argument to be dumped along with the log message.