Refactored log_debug to use ruby's stdlib logger

Replaces our old logger (which logged to STDOUT), so that we can implement log levels.