2023-04-12 19:13:14 +02:00
|
|
|
// const { LoggerClient } = require('../');
|
2023-06-15 12:13:46 +02:00
|
|
|
import { LoggerClient } from '../build/esm/index.js';
|
2022-11-08 21:03:35 +01:00
|
|
|
|
|
|
|
const logger = new LoggerClient({
|
|
|
|
customTypes: [ 'access' ],
|
|
|
|
customStreams: [ 'access' ],
|
|
|
|
customTypeMapping: { access: 'access', warn: 'error' },
|
2023-04-13 15:25:49 +02:00
|
|
|
customColours: { access: 'green' },
|
2023-03-26 19:38:15 +02:00
|
|
|
logLevelMapping: { access: 2 }
|
2022-11-08 21:03:35 +01:00
|
|
|
});
|
|
|
|
|
2023-06-15 12:13:46 +02:00
|
|
|
const main = async () =>
|
|
|
|
{
|
|
|
|
for (let i = 0; i < 5; i++)
|
|
|
|
{
|
2023-03-26 19:38:15 +02:00
|
|
|
// if (i % 500 === 0)
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
2023-03-23 17:50:49 +01:00
|
|
|
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();
|