protected function createLoggerInstance($handler, $target)
    {
        $handlerClassName = $handler . 'Handler';

        if (class_exists('\Monolog\Logger') && class_exists('\Monolog\Handler\\' . $handlerClassName)) {
            if (null !== $handlerInstance = $this->createHandlerInstance($handlerClassName, $target)) {
                $this->instance = new \Monolog\Logger('main');
                $this->instance->pushHandler($handlerInstance);
            }

            $this->handler = $handler;
            $this->target = $target;
        }
    }
protected function createLoggerInstance($handler, $target)
    {
        $handlerClassName = $handler . 'Handler';

        if (class_exists('\Monolog\Logger') && class_exists('\Monolog\Handler\\' . $handlerClassName)) {
            if (null !== $handlerInstance = $this->createHandlerInstance($handlerClassName, $target)) {
                $this->instance = new \Monolog\Logger('main');
                $this->instance->pushHandler($handlerInstance);
            }

            $this->handler = $handler;
            $this->target = $target;
        }
    }
protected function createLoggerInstance ( $ handler , $ target ) { $ handlerClassName = $ handler . 'Handler' ; if ( class_exists ( '\Monolog\Logger' ) && class_exists ( '\Monolog\Handler\\' . $ handlerClassName ) ) { if ( null !== $ handlerInstance = $ this -> createHandlerInstance ( $ handlerClassName , $ target ) ) { $ this -> instance = new \ Monolog \ Logger ( 'main' ) ; $ this -> instance -> pushHandler ( $ handlerInstance ) ; } $ this -> handler = $ handler ; $ this -> target = $ target ; } }
Create a Monolog\Logger instance and attach a handler

@param  string $handler Name of the handler, without the "Handler" part
@param  string $target  Comma separated list of arguments to pass to the handler
@return void
Create a Monolog \ Logger instance and attach a handler