Skip to main content

logWorkflowContext

A Workflow Engine function that logs the contents of workflowContext to the current Moogfarmd log file at a warning level.

This function is for debugging and troubleshooting purposes. Do not use it in a regular production workflow.

This function is available as a feature of the Workflow Engine v1.1 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function logWorkflowContext has no arguments.

Example

The following example demonstrates typical use of Workflow Engine function logWorkflowContext.

For identification purposes, each workflowContext log file entry provides the alert or Situation ID, or the event signature:

WORKFLOW CONTEXT: ALERT: 23 :  : 
{
    "payloads": [
        {
            "alert_id": 23,
            "description": "Ping fail 10.0.0.1",
            "class": "wqtooling",
            "type": "RestTest",
            "severity": "Minor",
            "agent": "RESTLAM:rest_test.js",
            "services": [
                "a",
                "b",
                "c"
            ],
            "servicesList": "[\"a\",\"b\",\"c\"]",
            "manger": "Manager:RESTLam1"
        }
    ],
    "location": {
        "city": {
            "mycity": {
                "mytown": "London"
            }
        }
    }
}