• Ready for review
  • Searching logs

    We have previously looked at how to set up custom logging for your workflow.

    In this article we will show you how you can search through the logs that have been generated by a block, to find information on what was transferred, and when it happened.

    Canvas logs block output responses and stores the data for 30 days.

    The three search types

    Canvas provides different ways of searching through the logged data. The following screenshots will illustrate the differences between the three search types:

    1) Search option “All data”:

    “All data” simply returns all data output from a block in a given time range:

    All logged data output from the block “Update Employees” in the given time range will be returned.

     

    2) Search option “By response”:

    “By response” is only available if you have defined a search model for a block, which lets you search for specific values in specific fields (for example search for specific employee numbers, order numbers, etc.)

    Logged output for the block “Update Employees” will be searched to see if a match can be found in any of the fields from the search model.
    (Note, this will only work starting from the time the search model was set up.)

     

    3) Search option “By user log”:

    “By user log” lets you type in a text string to search through all messages generated using logger.log() in the block code. (Note that search string should not be placed within quotation marks, i.e. just Test, not “Test”).

     

     

    Creating a search

    To search through logged items for a given workflow, go to the workflow editor and click the search icon🔍:

    A popup will appear, showing a list of previous searches and their results:

    Click the New button to create a new search query.

     

    You will be presented with the following search options:

    • Under Block select which block you want to search the logs for

    • Under Search option gives you the option of three search types described above (“All data”, “By response”, and “By user log”)

    • Search From and Search To specify the search range

    • Hide in result lets you choose results to filter out, for example if the block ran but did not provide a response

     

    Click the Find button to execute the search.

     

    Viewing the search results

    When the search has finished it will show status Completed, and it will show how many matches was found:

     

    Click the View button to inspect the results.

    Here you will find the logged output for the different runs, and a button for downloading the logs if needed: