Package Exports
- common-log-format
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (common-log-format) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
#common-log-format Pipe the common log format in, get JSON out. Useful for converting web logs into a format more readily consumed by a node.js app.
##Usage ###As a library
$ npm install common-log-formatvar clf = require("common-log-format");
process.stdin.pipe(clf()).pipe(process.stdout);###Command line
This will install the clf command line tool:
$ npm install -g common-log-format$ cat my-web-log.txt | clf
{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:05:26.000Z","request":"GET /package.json HTTP/1.1","status":200,"bytes":733}{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:05:26.000Z","request":"GET /package.json HTTP/1.1","status":200,"bytes":733}{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:05:26.000Z","request":"GET /package.json HTTP/1.1","status":200,"bytes":733}{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:05:27.000Z","request":"GET /package.json HTTP/1.1","status":200,"bytes":733}{"remoteHost":"127.0.0.1","remoteLogName":"-","authUser":"-","date":"2014-06-11T16:05:27.000Z","request":"GET /package.json HTTP/1.1","status":200,"bytes":733}