log

This object holds the logging methods. It’s one method for each log level and takes the same number of parameters.

log.debug(message, args)
Arguments:
  • message (string) – Message to log as a debug-level message.
  • args (array) – Optional arguments used in message format.
log.info(message, args)
Arguments:
  • message (string) – Message to log as a info-level message.
  • args (array) – Optional arguments used in message format.
log.warning(message, args)
Arguments:
  • message (string) – Message to log as a warning-level message.
  • args (array) – Optional arguments used in message format.
log.error(message, args)
Arguments:
  • message (string) – Message to log as a error-level message.
  • args (array) – Optional arguments used in message format.

Examples:

// Log a simple message
log.debug('Hello World');

// Log a formatting message
log.debug('Hello %s', 'World');

// Log a formatting message
log.debug('%s %s', 'Hello', 'World');