@fibery/vizydrop-logger

Vizydrop predefined logger based on winston v3

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@fibery/vizydrop-logger
3.1.220 days ago2 years agoMinified + gzip package size for @fibery/vizydrop-logger in KB

Readme

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`);