logger/test/test.js

20 lines
624 B
JavaScript

/* eslint-disable no-console */
const { MasterLogger } = require('../');
const logger = new MasterLogger({
debug: true,
customTypes: [ 'access' ],
customStreams: [ 'access' ],
customTypeMapping: { access: 'access', warn: 'error' },
customColors: { access: 'green' }
});
const { types, colours, streamTypes, streamTypeMapping } = logger; // , writeStreams
console.log(types, colours, streamTypes, streamTypeMapping); // , writeStreams
logger.info('Info test');
logger.status('Status test');
logger.debug('Debug test');
logger.warn('Warn test');
logger.error('Error test');
logger.access('Access test');