public static function setHandler($level = null, $handler = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

        if (!empty($handler)) {
            static::$handler = $handler;
            return;
        }

        static::$handler = new \Monolog\Handler\StdoutHandler(constant("\Monolog\Logger::$level"));
        static::$handler->setFormatter(static::getFormatter());
    }
public static function setHandler($level = null, $handler = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

        if (!empty($handler)) {
            static::$handler = $handler;
            return;
        }

        static::$handler = new \Monolog\Handler\StdoutHandler(constant("\Monolog\Logger::$level"));
        static::$handler->setFormatter(static::getFormatter());
    }
public static function setHandler ( $ level = null , $ handler = null ) { if ( empty ( $ level ) ) { $ level = static :: DEFAULT_LEVEL ; } if ( ! empty ( $ handler ) ) { static :: $ handler = $ handler ; return ; } static :: $ handler = new \ Monolog \ Handler \ StdoutHandler ( constant ( "\Monolog\Logger::$level" ) ) ; static :: $ handler -> setFormatter ( static :: getFormatter ( ) ) ; }
Set log handler

If no hanlder given, we assume a sensible default

@param string $level Log level
@param  object $formatter Formatter intance
@return object
Set log handler