open-rest-access-log

这是一个 open-rest 的中间件插件用来记录访问的日志,带有自动按天切分日志的功能,可以自定义log 格式

Build status codecov NPM version

Node version

 >= 6 

Usage

Write access log for http-server
npm install open-rest-access-log --save
const logger = require('open-rest-access-log');
// /var/log/app/access-20160630.log
// /var/log/app/access-20160701.log
// /var/log/app/access-20160702.log

// 返回的这个函数形似 (req, res, next) => { /**/ } 放在 ./app/middle-wares/index.js 里即可
logger('/var/log/app/access', 'YYYY-MM-DD HH:mm:ss', logFormat)

results matching ""

    No results matching ""