Cloud Function Filtered Logger
A lightweight wrapper for
console with added timestamp, log level indicator, and styling - for use with adenin cloud functions.
npm install @adenin/cf-logger
A file which wishes to use the logger simply needs to import it, then use its methods, as follows:
const logger = ;const msg = 'Hello world!';logger;logger;logger;logger;logger;
NODE_ENV=development, all statements will be logged, if
NODE_ENV=production, only error statements will be logged.