added ability to set log level