This would allow lazy evaluation of log output, so that if you need to run an expensive operation to collect stats, that isn't called if the loglevel would not output it anyway.
It should behave like:
const slowFunctionToFetchDebugData = () => {
// slow stuff
};
logger.debug(slowFunctionToFetchDebugData);
This would allow lazy evaluation of log output, so that if you need to run an expensive operation to collect stats, that isn't called if the loglevel would not output it anyway.
It should behave like: