protected function parseLevel($level) { if (isset($this->levels[$level])) { return $this->levels[$level]; } throw new InvalidArgumentException('Invalid log level.'); }