The logs are one of the most important places of your app when your building your app and it's also your first stop when you're running into an unexpected error.
The logs are mostly used for 2 things:
- The logs provide information on just about anything that's giving you an error.
- The logs keep track of anything on which you've turned on 'Enable debug logging' and/or 'Log execution of action'.
What can you see in the logs?
In the logs you’ll see a grid view. You can filter this view on one of the 4 log-types if you want.
The view contains log items with the following properties:
The specific moment when the log item was created.
Shows the content of the log item.
Shows which variables where available at a specific moment. You can click these to see their values at that specific moment.
Which user initiated the action which is shown.
Most log-items can be expanded when clicked. You can recognise a expandable log item by the caret (>) and the beginning of the message. When you click an expandable log item, it can take a few seconds to load the details depending on size of the log-item that's loaded.
Let's look at an example log to explain the message further.
This is the action which we're logging
And this is the log which the action gave
This particular log-items comes from a GET-endpoint on which 'Enable debug logging' is turned on. The user column is empty at this point because an endpoint doesn't have a current_user (unless you're using 'Requires autentication' on the endpoint). You can tell the log is from an GET-endpoint because the message starts with 'Incoming'. This indicates a incoming request, which mostly come from endpoints.
Also, the second line states
ENDPOINT. This is where the action's trigger is defined. In this case it's an enpoint request, so it has no specific trigger but if you look at the log-item of an executed action, this will state the trigger of the action.
On the first line you can see the total execution time of the action. The time-column also gives the time when an line was executed.
At the end of the line you can also see the request which was triggered the endpoint by clicking on
When performing an http request event you can also access the
RESPONSE. Notice the http request in the example log.
Every log item line starts with the action event type which is executed at that time.
Our example starts with
CONDITION GROUP which indicates an condition-event with an if and else way defined.
The next condition only has an if-way defined, so it doesn't start with
You can look at the value of your variables by clicking them at the right. You can also expand all variables available at a specific log line by clicking the elipsis-button (the three dots) in the variables column.
For more info about the logs you can always check out the logs HowTo's or send us a message via Intercom!