How to log something to the web server logs

Hi,

This seems like a simple questions but I cannot find any reference online.

How can i log the content of a variable to the web server log, to evaluate execution of an api call.

Thanks in advance.

1 Like

Hello @Wim_De_Pril
Can you explain please?
You need to execute an api, then catch the response and store it?

Not quite, Iā€™m executing an api call and I want to inspect the content of a variable along the way of the api call.

In normal development e.g. golang I would do fmt.Log( ā€œprint the variableā€) and I would see it in the terminal.

The way people do it here is by using the Set Value step with the Output checkbox checked, so you can see the variable in the API response.

If you really want to print to the terminal you probably need to use a custom extension. Someone did one for NodeJS, but Iā€™m not familiar with it. Thereā€™s also the RunJS extension (NodeJS) where you could do a console.log, which is actually what I used once