1.0.3 • Published 7 years ago

egg-loger v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

egg-loger

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-loger --save

Usage

// {app_root}/config/plugin.js
exports.loger = {
  enable: true,
  package: 'egg-loger',
};

Configuration

// {app_root}/config/config.default.js
exports.loger = {
    enable: true,
    formats: 'short'
};

if this enable=true , so all the request will loged

if this enable=false , you need add app.loger in where router you need to log;
eg: app.get('/', app.loger, 'home.index');

about formats , it is koa-log arguments, default is 'dev'. if you need more formats, Please see koa-log

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT