Format logs for Serverless Apps

Is there any way to format the serverless logs for a custom app? As an example, I want to log both a fixed message (e.g. name of the function) and then a variable. To make the distinction between both easier I would like to have each on a separate line.

Hi @chrism,

There is no special log formatter for serverless apps. Logs are written in server.js using console.info (normal flow) or console.error (errors). They can be viewed under Admin → Apps → [your app] → Settings → Logs (the app must have installation parameters so Settings is available).

To separate a fixed label from a variable, either:

  • Use two log lines, e.g.
    console.info('[functionName] started');
    console.info('ticketId:', ticketId);
    or

  • Use one line with a line break, e.g.
    console.info('[functionName]\nticketId: ' + ticketId);

Please avoid logging full args, iparams, or secrets; only log the specific fields needed for debugging.

Best regards,
Himanshu