Skip to content

provides a slim and easy to use json-layout for log4js-node

License

Notifications You must be signed in to change notification settings

Yontih/log4js-json-layout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log4js-json-layout

NPM

provides a slim and easy to use json-layout for log4js-node (https://github.com/nomiddlename/log4js-node)

installation

npm install jog4js-json-layout

usage

layout should be type 'json'

currently we support include options only, array of items is expected log object will contain these properties : ["startTime","categoryName","data","level"] source param will be added to each json object if provided

var log4js = require('log4js');
var jsonLayout = require('jog4js-json-layout');

log4js.layouts.addLayout('json', jsonLayout);

appenders = [{
    type: 'console',
    layout: {
        type: 'json',
        source : 'development',
        include: ['startTime', 'categoryName']
    }
  }
];

About

provides a slim and easy to use json-layout for log4js-node

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%