koa-logging-middleware

1.0.10 • Public • Published

Koa-logging-middleware

This is a logging middleware for Koa.js server. It records every request in month-rotated log file in your specialized path.

    const http = require('http');
    const Koa = require("koa");
    const app = new Koa();
    const logger = require('koa-logging-middleware');

    app.use(logger('./log/'));  //fill in the your log path as argument

    app.createServer(app.callback()).listen(80,()=>{
        console.log('server is listening on 80 port')
    })

log format/fields

[date] <client ip> method status url type browser engine os architecture

Readme

Keywords

Package Sidebar

Install

npm i koa-logging-middleware

Weekly Downloads

1

Version

1.0.10

License

ISC

Unpacked Size

3.41 kB

Total Files

3

Last publish

Collaborators

  • youngjiwen