logger/test/otherProcess.js
2023-03-23 18:50:49 +02:00

24 lines
656 B
JavaScript

const { LoggerClient } = require('../');
const logger = new LoggerClient({
debug: true,
customTypes: [ 'access' ],
customStreams: [ 'access' ],
customTypeMapping: { access: 'access', warn: 'error' },
customColors: { access: 'green' }
});
const main = async () => {
for (let i = 0; i < 10000; i++) {
if (i % 500 === 0)
await new Promise(resolve => setTimeout(resolve, 1000));
logger.info('Info test');
logger.status('Status test');
logger.debug('Debug test');
logger.warn('Warn test');
logger.error('Error test');
logger.access('Access test');
}
};
main();