Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prints statistics from the incoming web log stream to the console

License

NotificationsYou must be signed in to change notification settings

lwsjs/stream-log-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

view on npmnpm module downloadsGihub repo dependentsGihub package dependentsNode.js CIjs-standard-style

stream-log-stats

Presents a dynamic view of the incomingcommon log format data to the console. The view is refreshed as new data streams in.

Installation

Mac / Linux users may need to run the install commands withsudo.

As a library

Move into your project directory then run:

$ npm install stream-log-stats --save

Example

varconnect=require('connect')varmorgan=require('morgan')// logging middlewarevarhttp=require('http')varlogStats=require('stream-log-stats')varapp=connect()app.use(morgan({stream:logStats()}))varserver=http.createServer(app).listen(8000)

As a command-line app

From any directory run the following:

$ npm install -g stream-log-stats

Now thelog-stats utility is installed. Pipe in a common-log-format log to view the statistics.

Example

This example pipes the output fromlocal-web-server intolog-stats.

$ ws -f common | log-statsserving at http://localhost:8000Clients  Requests  Transferred1        48        2.79 MBExtension          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 KBResource                                                   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-25 Lloyd Brookes <75pound@gmail.com>.

About

Prints statistics from the incoming web log stream to the console

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp