Is there a way to access logs in order to debug?

A client has asked: - I’m trying to do a curlCall in a webhook function. Is there a way to understand what’s not working?

Yes! you can use the “Error log” in the low-code area :slight_smile:

Nice! I’ve actually seen this screen in the developer area. But my question is: Are these just error logs? How can I actively create Logs?

For example, I’m trying to make a curlCall like this, but I’m having some trouble debugging it:

$response  = Jestor.curlCall($url,array(
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
CURLOPT_POST => false
));

Is it possible to do something like this:

Jestor.log($response)

And log the response variable (or any other variable). It makes it really hard to debug without the ability to log variables.

Thanks in advance.

Hey @fernando.nakandakari can you help Daniel?

Hey @danielcspaiva ,

There’s a couple of ways I’ve seen people debug that may fit what you need.

The first would be creating a table in Jestor where you can send the info. So if you create a Logs table with a long text field, you can do something like:

$log = array(
   "name" => "Log: ".date("Y-m-d H:i:s"),
   "log" => $response;
);
Jestor.create('logs',$log);

And then you’ll have that info on the table.

Another way to go about it if all you need to do is check the info real quick and don’t need to store the data, is using Jestor.error (do note that it only works in synchronous automations).

If you do something like this:

Jestor.error($response);

The $response data will show up on the interface as an error message. Also, Jestor.error will cause the process to pause, which means everything that happened in the automation will revert back to the original state. This is useful if you’re just testing the curlCall but doesn’t want to actually follow through with the process during this debugging/setting up stage.

As for a Jestor.log feature, I highly encourage you to submit it to the Product Feedback board if you haven’t already! I can definitely see how a dedicated, fast method could help out other builders!

2 Likes