Throw exception for invalid log level.
Merge pull request #2463 from ADmad/3.0-log

Throw exception for invalid log level.