Skip to content

Log (custom log line)

ts
function Log(line: any);

This function adds your own custom line to the software's log. Typically you’d call this function with a string parameter, but truly it will log anything you pass to it.

It’s practically very similar to JavaScript’s own log() and it’s used the same way. But SyncJS' Log() function is to be preferred to JavaScript’s log() because our own function always works, in every context, synchronous or asynchronous, and doesn't require a console to be available to log to it. Your log line will be added to whatever logging destination you have configured in the software at any point in time.

Example

ts
{
  Log('Hello!!');
  // ...
  Log(JSON.stringify(some_data));
}