discord-baymax-bot/node_modules/log4js/examples/patternLayout-tokens.js

21 lines
431 B
JavaScript
Raw Normal View History

2017-03-24 04:52:08 +00:00
var log4js = require('./lib/log4js');
var config = {
"appenders": [
{
"type": "console",
"layout": {
"type": "pattern",
"pattern": "%[%r (%x{pid}) %p %c -%] %m%n",
"tokens": {
"pid" : function() { return process.pid; }
}
}
}
]
};
log4js.configure(config, {});
var logger = log4js.getLogger("app");
logger.info("Test log message");