Skip to content

Commit

Permalink
chore: add method doc for unexported log method in logger.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jun 14, 2024
1 parent 710746f commit 6279c79
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ const getLogMetadata = (metadata) => {
};
};

/**
* Perform logging operation on logMethod passed
*
* @param {*} logMethod
* - instance method reference
* - The logger should implement all of debug/info/warn/error methods
* @param {*} args
* - the arguments that needs to be passed to logger instance method
*/
const log = (logMethod, args) => {
const [message, logInfo, ...otherArgs] = args;
if (logInfo) {
Expand Down

0 comments on commit 6279c79

Please sign in to comment.