add ability to specify logging level (debug, info, warning, error)