It add useful meta data of code (file-name, function-name line-number, column-number) for log4js-node
.
Example
[2014-02-18 12:24:14.238] [INFO] category - test at <anonymous> (test.js:57:9)
Installation
npm install log4js-extend
Usage
const log4js = ;const log4js_extend = ; ; const logger = log4js;logger;
Options
path
Use relative path from path directory.
default: null
format
Simple log format.
default: "at @name (@file:@line:@column)"
Keywords will replace as below.
- @name : function name
- @file : file name
- @line : line number
- @column : column number