Skip to main content

Quantela platform user manual

Logger

Description

This is a simple logger function that takes a log type/level and log key and logs the user specified text to the console.log. The log message is also provided in the output parameter.

Input

String - text to be logged

Output

JSON - formatted log message

Log Type

This can be one of the following:

  • Fatal - logger.log("fatal", {"data":"response"});

  • Error - logger.log("error", {"data":"response"});

  • Warn - logger.log("warn", {"data":"response"});

  • Info - logger.log("info", {"data":"response"});

  • Verbose - logger.log("verbose", {"data":"response"});

  • Debug - logger.log("debug", {"data":"response"});

  • Silly - logger.log("silly", {"data":"response"});

Log Key

The key that can be used to identify this message in the log file.