protected function getLevel($type)
    {
        if (!isset($this->types[$type])) {
            throw new InvalidArgumentException('Invalid log type.');
        }

        return $this->types[$type];
    }