Added ability to change the log level.