public function filter($level, $allowed)
    {
        if (empty($allowed)) {
            return true;
        }

        if (is_array($allowed)) {
            $merges = array_values(array_uintersect($this->levels, $allowed, "strcasecmp"));
            if (in_array(strtolower($level), $merges)) {
                return true;
            }
        }

        return false;
    }