teda
small middleware for logging HTTP requests
Installation
$ npm i teda
Usage
import express from 'express';
import teda from 'teda';
const app = express();
app.use(teda(':method :url :status :content-length - :duration ms'));
app.get('/', (req, res) => {
res.send('hello world!')
});
Predefined Formats
default
:remote-addr - [:date] ":method :url HTTP/:http-version" :status :content-length - :duration ms
tiny
:method :url :status :content-length - :duration ms
Tokens
- :remote-addr
- :method
- :url
- :http-version
- :user-agent
- :status
- :date
- :content-length
- :duration
Licence
MIT License, see LICENSE