![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
common-log-format
Advanced tools
Readme
Pipe common log format in, get JSON out. Useful for converting web logs into a format more easily consumed by Javascript.
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
{
"remoteHost": "127.0.0.1",
"remoteLogName": "-",
"authUser": "-",
"date": "2014-06-11T16:24:02.000Z",
"request": "GET / HTTP/1.1",
"status": 200,
"bytes": 10305
}
{
"remoteHost": "127.0.0.1",
"remoteLogName": "-",
"authUser": "-",
"date": "2014-06-11T16:24:08.000Z",
"request": "GET /package.json HTTP/1.1",
"status": 304,
"bytes": null
}
$ npm install common-log-format
import clf from 'common-log-format'
process.stdin.pipe(clf()).pipe(process.stdout)
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}
© 2015-2023 Lloyd Brookes <75pound@gmail.com>.
FAQs
Transform web logs (common log format) to JSON
The npm package common-log-format receives a total of 53,778 weekly downloads. As such, common-log-format popularity was classified as popular.
We found that common-log-format demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.