egg-loger
v1.0.3
Published
request log
Downloads
12
Maintainers
Readme
egg-loger
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.