Fix bug in parse_log_level() & add unit tests.