Wondering what’s next for npm?Check out our public roadmap! »

@vizydrop/logger

1.9.3 • Public • Published

logger

Usage

const logger = require(`@vizydrop/logger`);
 
const log = logger({
    level: `info`,
    mode: process.env.NODE_ENV,
    correlationId: {
        enabled: true,
        fieldName: `correlationId`, // default name is correlationId
        getCorrelationId: () => `correlation-id-value`, // required
        emptyValue: null, // used when correlation id is missing
    },
    additionalFields: {field1: `value`},
});
 
log.info(`message`);

Install

npm i @vizydrop/logger

DownloadsWeekly Downloads

67

Version

1.9.3

License

MIT

Unpacked Size

16.6 kB

Total Files

17

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar