Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
stream-log-stats
Advanced tools
Prints statistics from the incoming web log stream to the console
Presents a dynamic view of the incoming common log format data to the console. The view is refreshed as new data streams in.
Mac / Linux users may need to run the install commands with sudo
.
Move into your project directory then run:
$ npm install stream-log-stats --save
var connect = require('connect')
var morgan = require('morgan') // logging middleware
var http = require('http')
var logStats = require('stream-log-stats')
var app = connect()
app.use(morgan({ stream: logStats() }))
var server = http.createServer(app).listen(8000)
From any directory run the following:
$ npm install -g stream-log-stats
Now the log-stats
utility is installed. Pipe in a common-log-format log to view the statistics.
This example pipes the output from local-web-server into log-stats
.
$ ws -f common | log-stats
serving at http://localhost:8000
Clients Requests Transferred
1 48 2.79 MB
Extension Requests Transferred
.jpg 16 690.24 KB
.woff 7 1.39 MB
.css 6 128.84 KB
.js 4 311.44 KB
.png 3 16.93 KB
.3 3 130.17 KB
.ttf 3 63.71 KB
.map 3 35.81 KB
.html 2 29.59 KB
<none> 1 19.96 KB
Resource Requests Transferred
/_gh-pages/assets/images/75lb.png 3 16.93 KB
...t-awesome-4.0.3/fonts/fontawesome-webfont.woff?v=4.0.3 3 130.17 KB
/_gh-pages/assets/fonts//Lombardic.ttf 3 63.71 KB
/_gh-pages/assets/fonts/PTSansWeb/PTS76F_W.woff 3 535.03 KB
...s/assets/fonts/font-awesome-4.0.3/css/font-awesome.css 3 63.45 KB
/_gh-pages/assets/styles/screen.css 3 65.39 KB
/_gh-pages/assets/styles/screen.css.map 3 35.81 KB
/_gh-pages/assets/images/thumb/present-continuous.jpg 2 49.53 KB
/_gh-pages/assets/images/thumb/past-simple.jpg 2 82.27 KB
/_gh-pages/assets/fonts/PTSansWeb/PTS75F_W.woff 2 465.52 KB
© 2015-19 Lloyd Brookes <75pound@gmail.com>.
FAQs
Prints statistics from the incoming web log stream to the console
The npm package stream-log-stats receives a total of 40,130 weekly downloads. As such, stream-log-stats popularity was classified as popular.
We found that stream-log-stats 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.