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);
    }