Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugLogGraphObject ¶
DebugLogGraphObject is a helper function to serialize and debug log Microsoft Graph objects that implement serialization.Parsable. This function takes a Microsoft Graph object (like a policy, device configuration, etc.) and converts it into a human-readable JSON format before it gets sent to Microsoft's API. It's like taking a snapshot of what we're about to send.
Parameters:
- ctx: The context for logging
- message: A descriptive message that will prefix the JSON in the logs
- object: Any Microsoft Graph object that implements serialization.Parsable
Returns:
- error: Any error encountered during serialization or logging
Usage example:
if err := debugLogGraphObject(ctx, "Final JSON to be sent to Graph API", profile); err != nil {
tflog.Error(ctx, "Failed to debug log object", map[string]interface{}{
"error": err.Error(),
})
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.