constructors

package
v0.26.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2025 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugLogGraphObject

func DebugLogGraphObject(ctx context.Context, message string, object serialization.Parsable) error

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.

Directories

Path Synopsis
graph_beta

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL