Orchestrator Function: Log Input Properties

by Simon Sparks · 4 February 2026

To use this function add it to the class library file named Utilities.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: Utilities.ts

Public Function: logInputPropertiesForSubscription

publicstaticlogInputPropertiesForSubscription(objLogger:Logger,inputProperties:Properties,strWorkflowName:string):void{
this.logInputProperties(objLogger,inputProperties,"Subscription",strWorkflowName);
}

Public Function: logInputPropertiesForWorkflow

publicstaticlogInputPropertiesForWorkflow(objLogger:Logger,inputProperties:Properties,strWorkflowName:string):void{
this.logInputProperties(objLogger,inputProperties,"Resource Action",strWorkflowName);
}

Private Function: logInputProperties

privatestaticlogInputProperties(objLogger:Logger,inputProperties:Properties,strLogTypeName:string,strObjectName:string):void{
letarrInputPropertyKey:string[]=inputProperties.keys;

arrInputPropertyKey.forEach((strInputPropertyKey:string):void=>{

if (strInputPropertyKey==="customProperties"){
letobjCustomProperties:Properties=inputProperties.get("customProperties");

letarrCustomPropertyKey:string[]=objCustomProperties.keys;

arrCustomPropertyKey.forEach((strCustomPropertyKey:string):void=>{
letobjCustomPropertyValue:string=objCustomProperties.get<string>(strCustomPropertyKey);

letstrType:string=typeofobjCustomPropertyValue;

objLogger.info(`${strLogTypeName} -${strObjectName} - Custom Property -${strCustomPropertyKey}:${strType} = '${objCustomPropertyValue}'.`);
});
}
else{
letobjInputPropertyValue:string=inputProperties.get<string>(strInputPropertyKey);

letstrType:string=typeofobjInputPropertyValue;

objLogger.info(`${strLogTypeName} -${strObjectName} - Input Property -${strInputPropertyKey}:${strType} = '${objInputPropertyValue}'.`);
}
});
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like