Journey Logs

Raquel Updated by Raquel

To improve the developer experience, we also have logs on the Journey page. Logs allow you to see live errors happening in your number, where they’re happening, and why they’re happening.

The Log() function

The log function allows you to log information within the journey simulator, and into the Logs Page, so that you don't have to keep adding and removing `text` functions to understand how your journey is behaving!

card TextAndLogMessage do

text("Hello this is my first text.")

log("a simple message")

text("Hello this is my second text.")

end

However, you can also use it to log more complicated data structures, such as the dictionary below. You could also log structures such as @contact, made available within the chat.

card LogData do

text("@params.items.greeting!")

log("@params")

log("@contact")

end

Will result in the following:

There are two things to note about the log function.

  1. You need to pass in a string. If you want to evaluate a more complicated structure like `contacts`, you need to use an expression - so use log("@contact"), not log(contact). The journey will highlight this issue as an error if you attempt to do this.
  2. They currently only works within the journey simulator. They will not affect interactions when using a journey directly via WhatsApp.
  3. These logs are temporary. They will disappear each time you start a new session with the Stacks simulator

Was this article helpful?

Journeys Data

Staging and Version History

Contact