Implement logging support.

Instead of just logging to STDOUT with `puts`, this pull request implements support for using Ruby's Logger.