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

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

        static::$logger = new \Monolog\Logger("log");

        $handler = static::getHandler($level);
        static::$logger->pushHandler($handler);

        $processor = static::getProcessor();
        static::$logger->pushProcessor($processor);
    }
public static function setLogger($level = null, $logger = null)
    {
        if (empty($level)) {
            $level = static::DEFAULT_LEVEL;
        }

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

        static::$logger = new \Monolog\Logger("log");

        $handler = static::getHandler($level);
        static::$logger->pushHandler($handler);

        $processor = static::getProcessor();
        static::$logger->pushProcessor($processor);
    }
public static function setLogger ( $ level = null , $ logger = null ) { if ( empty ( $ level ) ) { $ level = static :: DEFAULT_LEVEL ; } if ( ! empty ( $ logger ) ) { static :: $ logger = $ logger ; return ; } static :: $ logger = new \ Monolog \ Logger ( "log" ) ; $ handler = static :: getHandler ( $ level ) ; static :: $ logger -> pushHandler ( $ handler ) ; $ processor = static :: getProcessor ( ) ; static :: $ logger -> pushProcessor ( $ processor ) ; }
Set logger object

If no logger is given, we assume a sensible default

@param string $level Log level
@param object $logger Logger object
@return void
Set logger object