Added multiple levels of logging, changing existing debug messages to be info level, and adding SQL output as debug messages.