Added support for log levels

This patch allows you to customize the verbosity of the built in logger. The log levels are derived from existing usage.