public function createProcessor($classOrName, $args = [])
    {
        $classes = [
            $classOrName,
            '\\Monolog\\Processor\\' . $classOrName
        ];

        foreach ($classes as $class)
        {
            if (class_exists($class))
            {
                return (new ReflectionClass($class))->newInstanceArgs($args);
            }
        }

        throw new InvalidArgumentException("Monolog processor [$classOrName] does not exist.");
    }
public function createProcessor($classOrName, $args = [])
    {
        $classes = [
            $classOrName,
            '\\Monolog\\Processor\\' . $classOrName
        ];

        foreach ($classes as $class)
        {
            if (class_exists($class))
            {
                return (new ReflectionClass($class))->newInstanceArgs($args);
            }
        }

        throw new InvalidArgumentException("Monolog processor [$classOrName] does not exist.");
    }
public function createProcessor ( $ classOrName , $ args = [ ] ) { $ classes = [ $ classOrName , '\\Monolog\\Processor\\' . $ classOrName ] ; foreach ( $ classes as $ class ) { if ( class_exists ( $ class ) ) { return ( new ReflectionClass ( $ class ) ) -> newInstanceArgs ( $ args ) ; } } throw new InvalidArgumentException ( "Monolog processor [$classOrName] does not exist." ) ; }
Create one of Monolog processors by specyfing it name of full class.

@param string $classOrName
@param mixed[] $args
@return callable
@throws InvalidArgumentException
Create one of Monolog processors by specyfing it name of full class .