Using Logs in the Webtask Editor
Use logs to help you develop your tasks!
Webtask allows you to see your
console.log() output. You can use these logs in Webtask to help with your development of tasks.
Logs in the Editor
Click the "Logs" button in the top right corner of the editor, and the logs panel will pop out in the bottom of the Webtask window. The logs will also show running information about the task, and the logs are searchable. The logs are only accumulating while open, so before running a task, make sure to open the logs panel.
Below is an overview of the various parts of the log panel:
When dumping data to logs, the amount of it could quickly get overwhelming to sift through. The Search Bar allows you to search the currently displayed log output for particular terms, error messages, etc.
Tip: Logs in Webtask are container specific, rather than task specific, so the logs will be for all of your tasks as opposed to just the current one. However, if you add the task name to your logs, you can then filter logs using the search bar to only show log entries from the current task!
The Autoscroll option, when enabled, keeps the logs panel at the latest log entry - it autoscrolls as new log items are added to the list. This allows you to be seeing the most recent log messages at any given time.
In the top right corner of the logs panel, there is a Clear button (a trash can icon) which can clear the current history of the logs panel. This is useful, for example, when debugging, once changes have been made, the logs panel can be wiped to a clean slate before starting a new attempt at running the task.
There is also a Download button which allows you to export the current logs to a text file that can be perused more easily in an editor. This is especially useful when there are large volumes of data that need filtered through, or saved for future use.
The logs panel has a Pop-out button which pops out the logs panel into a new tab or window to allow them to be seen more clearly. You can perhaps arrange a separate logs window next to the Webtask window, or in another monitor, in order to facilitate easy development and troubleshooting.
See the Webtask Log Streaming documentation for more general information about Webtask logs.