Make logging level based
Merge pull request #87 from ADmad/2.x-logger

Make logging level based