Add --log=xxx support

Supported log levels: error, warn, info, debug.

--verbose is the same as --log=info
--debug is the same as --log=debug
--log=warn is the default

Requested by mattgreenrocks on irc.