https://github.com/indexzero/node-clf-parser
A basic parser for the common log format seen in apache and nginx logs
https://github.com/indexzero/node-clf-parser
Last synced: 11 months ago
JSON representation
A basic parser for the common log format seen in apache and nginx logs
- Host: GitHub
- URL: https://github.com/indexzero/node-clf-parser
- Owner: indexzero
- Created: 2013-08-28T16:37:01.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-28T16:38:26.000Z (almost 13 years ago)
- Last Synced: 2024-10-18T21:03:25.176Z (over 1 year ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clf-parser
A little parser for getting useful stuff out of apache/nginx-style "common log
format" log lines.
## Example
```
josh@onix:/tmp/clf-parser$ node
> var parse = require('./index');
> parse('127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326');
{ remote_addr: '127.0.0.1',
remote_user: 'frank',
time_local: Mon Oct 09 2000 22:55:36 GMT-0800 (AKDT),
request: 'GET /apache_pb.gif HTTP/1.0',
status: 200,
body_bytes_sent: 2326 }
>
```
You get the idea.
## License
WTFPL