mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
19 lines
356 B
JavaScript
19 lines
356 B
JavaScript
'use strict';
|
|
|
|
const log4js = require('../lib/log4js');
|
|
|
|
log4js.configure({
|
|
appenders: {
|
|
file: { type: 'dateFile', filename: 'thing.log', pattern: '.mm' }
|
|
},
|
|
categories: {
|
|
default: { appenders: ['file'], level: 'debug' }
|
|
}
|
|
});
|
|
|
|
const logger = log4js.getLogger('thing');
|
|
|
|
setInterval(() => {
|
|
logger.info('just doing the thing');
|
|
}, 1000);
|