common-log-format
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "common-log-format", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A transform stream, converting common log format to JSON", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/common-log-format.git", |
@@ -9,2 +9,15 @@ [![view on npm](http://img.shields.io/npm/v/common-log-format.svg)](https://www.npmjs.org/package/common-log-format) | ||
##Example | ||
Standard log input such as: | ||
``` | ||
127.0.0.1 - - [Wed, 11 Jun 2014 16:24:02 GMT] "GET / HTTP/1.1" 200 10305 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4" | ||
127.0.0.1 - - [Wed, 11 Jun 2014 16:24:08 GMT] "GET /package.json HTTP/1.1" 304 - "http://localhost:8000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.76.4 (KHTML, like Gecko) Version/7.0.4 Safari/537.76.4" | ||
``` | ||
would be converted to | ||
```json | ||
{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:24:02.000Z","request":"GET / HTTP/1.1","status":200,"bytes":10305} | ||
``` | ||
##Usage | ||
@@ -11,0 +24,0 @@ ###As a library |
5045
43