Parameters & Logging

Prev Next

Parameters & Logging

The first part of the specific method includes:

  • The method parameters used when sending a request. These parameters will vary depending on the data that needs to be sent to the other system. There can be 0 to n parameters.
  • Setting the origin for all trace logging and error handling.

Example: Parameter and logging in adapter.js

sampleAPIcall(param1, param2, ..., callback) {
  const meth = 'adapter- sampleAPIcall’;
  const origin = `${this.id}-${meth}`;
  log.trace(origin);