Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeConfluence
const cloglog = require('./log/clog');


Then in your code, you can use the custom logger as follows:

Code Block
languagejs
themeConfluence
// In case of error, in the below code we are also sending metadata such as filepath and err in final log message.
cloglog.error(context, payload, {filepath: __filename, err: err});


// In case you want to send debug message
cloglog.debug(context, payload, 'This is my debug message');

...