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