public static void logSamlObject(final OpenSamlConfigBean configBean, final XMLObject samlObject) throws SamlException {
        if (LOGGER.isDebugEnabled() || LoggingUtils.isProtocolMessageLoggerEnabled()) {
            val repeat = "*".repeat(SAML_OBJECT_LOG_ASTERIXLINE_LENGTH);
            LOGGER.debug(repeat);
            try (val writer = transformSamlObject(configBean, samlObject, true)) {
                LOGGER.debug("Logging [{}]\n\n[{}]\n\n", samlObject.getClass().getName(), writer);
                LOGGER.debug(repeat);
                LoggingUtils.protocolMessage("SAML " + samlObject.getClass().getName(),
                    Map.of(), writer.toString());
            } catch (final Exception e) {
                throw new SamlException(e.getMessage(), e);
            }
        }
    }
Log saml object.

@param configBean the config bean
@param samlObject the saml object
@throws SamlException the saml exception
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/SamlUtils.java