public static function log($message, $level = self::LOG_DEBUG)
    {
        if (self::hasLogger()) {
            $logger = self::logger();
            switch ($level) {
                case self::LOG_EMERG:
                    return $logger->log($message, $level);
                case self::LOG_ALERT:
                    return $logger->alert($message);
                case self::LOG_CRIT:
                    return $logger->crit($message);
                case self::LOG_ERR:
                    return $logger->err($message);
                case self::LOG_WARNING:
                    return $logger->warning($message);
                case self::LOG_NOTICE:
                    return $logger->notice($message);
                case self::LOG_INFO:
                    return $logger->info($message);
                default:
                    return $logger->debug($message);
            }
        }

        return true;
    }