Open Navigation

Logs and Troubleshooting

On This Page

Intro to Logs


When a workflow is run it will produce a log of the input and output of each step in that workflow. This makes it easier to investigate issues and helps with building more complex workflows.

Note: you can also set up alerting workflows to automatically alert you about errors occurring in your workflows. Please see our guide on this for more information.

To view the logs for a workflow click on the DEBUG tab in the header of the builder:

debug

You are presented with the log search interface. There is a search box above the list of workflow runs and above the list of steps. You can use these search boxes to search your logs history. You can also search for text in the step data panel and occurrences of your input terms will be highlighted in the input/output boxes.:

logsearch1

The stages 1-5 of an example search are marked in the above screenshot. Click through the tabs below to get an explanation of what happens at each stage:

The first panel that you see is a view of all runs that have been triggered for the current workflow (note there is a PAUSE button at the bottom of the panel, to stop any new runs appearing). Each result is a single workflow run along with the current state or how long the total run took. New workflow runs appear at the bottom of the list. Red rows are workflow runs that failed at some point, green are successful runs and yellow are runs that are still currently running.

At stage 1 in the above example, a search was made for a run which had a successful execution of the 'slack-1' step.

At stage 2 a workflow run was selected from the results, which then populated the second 'Steps' panel (see the next tab)

In the second panel you will see the steps of the workflow run you just clicked on in the first panel. The same red, yellow, green status color coding applies. During a run, new steps appear at the bottom.

At stage 3 in the above example, the Slack (slack-1) step was selected, which then, as at stage 4, populated the third 'Steps Data' panel (see the next tab)

Note that the slack-1 step was the basis of the search at stage 1, where we asked for all workflow runs which included a successful 'slack-1' step.

Also note that the search box at the top of this panel could be used to narrow down the results, either by using similar success/failure/before/after filters or by using a free text search. A good example of a free text search

Pro tip: If you 'shift click' on a step the connector parameters for that step will appear, as in stage 5 above.

Clicking on any of the steps in the step run view will display the step details. This allows you to inspect the input and output data for the particular step as well as some other details like begin/end and total run time. Clicking the view button opens the input and output in a larger window.

Note that the panels are adjustable so you can customize your Tray workspace. There is also a compact mode for the run and step panels which you will see if you make those panels smaller. The interface remembers how you configure the different panels so you won't have to adjust them every time you open a workflow.

Searching Logs and Syntax

There is a search box above the list of workflow runs and above the list of steps. You can use these search boxes to search your logs history. You can also search for text in the step data panel and occurrences of your input terms will be highlighted in the input/output boxes.

On most plans we retain logs for 30 days.

The syntax for searching your logs is quite powerful. Your search query is constructed from two parts separated by a colon.

The following screenshot gives another good example of how the syntax works:

search-log-sf-email

In this case output[salesforce-1][*]:thomas@tray.io is searching the output of all succesful runs of the salesforce-1 connector for an email address.

The following tables give a breakdown and examples of the searching syntax:

Basic Searching Syntax

NameFunctionExampleResult
BeforeReturn runs/steps before a specific date and time (yyyy-mm-dd hh:mm)before:2016-12-24 14:50Dates Before 24th December 2016 at 14:50
AfterReturn runs/steps after a specific date and time (yyyy-mm-dd hh:mm)after:2016-12-24 14:50Dates After 24th December 2016 at 14:50
SuccessReturn runs/steps that were successfulsuccess:[*]

success:storage-2


All successful runs/steps

In Runs Panel: All runs containing a successful step called 'storage-2'.
In Steps Panel: All successful steps called 'storage-2'
FailureReturn runs/steps that have failedfailure:[*]

failure:storage-2


All failed runs/steps

In Runs Panel: All runs containing a failed step called 'storage-2'.
In Steps Panel: All failed steps called 'storage-2'
Running
Return runs that are currently still being executed (i.e. still running)

running:[*]

running:delay-2


All runs that are currently running

All runs containing a currently running step called 'delay-2'

Input / Output Searching

NameQuery FormatFunctionExampleResult
Inputinput[step_name][key_name]:valueReturn runs/steps in which the step input has a particular valueinput[storage-1][scope]:workflowIn Runs Panel: All runs containing a step called 'storage-1' which have a key in the input called 'scope' with the value 'workflow'.
In Steps Panel: All steps called 'storage-1' which have a key in the input called 'scope' with the value 'workflow'.
"""input[storage-1][*]:workflowIn Runs Panel: All runs containing a step called 'storage-1' which have any key in the input with the value 'workflow'.
In Steps Panel: All steps called 'storage-1' which have any key in the input with the value 'workflow'
"""input[*][scope]:workflowIn Runs Panel: All runs which have any step with a key in the input called 'scope' with the value 'workflow'.
In Steps Panel: All steps which have any key in the input called 'scope' with the value 'workflow'
"""input[*][*]:workflowIn Runs Panel: All runs which have any key in the input with the value 'workflow'.
In Steps Panel: All steps which have any key in the input with the value 'workflow'
Outputoutput[step_name][key_name]:valueReturn runs/steps in which the step output has a particular valueoutput[storage-1][scope]:workflowIn Runs Panel: All runs containing a step called 'storage-1' which have a key in the output called 'scope' with the value 'workflow'.
In Steps Panel: All steps called 'storage-1' which have a key in the output called 'scope' with the value 'workflow'
"""output[storage-1][*]:workflowIn Runs Panel: All runs containing a step called 'storage-1' which have any key in the output with the value 'workflow'
In Steps Panel: All steps called 'storage-1' which have any key in the output with the value 'workflow'
"""output[*][scope]:workflowIn Runs Panel: All runs which have any step with a key in the output called 'scope' with the value 'workflow'.
In Steps Panel: All steps which have any key in the output called 'scope' with the value 'workflow'
"""output[*][*]:workflowIn Runs Panel: All runs which have any key in the output with the value 'workflow'.
In Steps Panel: All steps which have any key in the output with the value 'workflow'
Was this article helpful?
Yes
No
On This Page