Class SamlLog
java.lang.Object
se.swedenconnect.opensaml.common.utils.SamlLog
Utilities for logging SAML messages.
- Author:
- Martin Lindström (martin@idsec.se)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends org.opensaml.core.xml.XMLObject>
StringtoString
(T object) Returns the given SAML object in its "pretty print" XML string form.static <T extends org.opensaml.core.xml.XMLObject>
StringtoStringSafe
(T object) The same asObject.toString()
but the method never throws (returns the empty string instead).
-
Method Details
-
toString
public static <T extends org.opensaml.core.xml.XMLObject> String toString(T object) throws org.opensaml.core.xml.io.MarshallingException Returns the given SAML object in its "pretty print" XML string form.- Type Parameters:
T
- the type of object to "print"- Parameters:
object
- the object to display as a string- Returns:
- the XML as a string
- Throws:
org.opensaml.core.xml.io.MarshallingException
- for marshalling errors
-
toStringSafe
The same asObject.toString()
but the method never throws (returns the empty string instead). Useful for logging statements.- Type Parameters:
T
- the type of object to "print"- Parameters:
object
- the object to display as a string- Returns:
- the XML as a string
-