Skip to content

How to output an access log

Lloyd Brookes edited this page Jul 7, 2017 · 3 revisions

To output a dynamic view showing traffic statistics use --log.format stats. To output traditional web server access logs, use --log.format with any other value:

$ ws --log.format combined
serving at http://localhost:8000
::1 - - [16/Nov/2015:11:16:52 +0000] "GET / HTTP/1.1" 200 12290 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2562.0 Safari/537.36"

The format value supplied is passed directly to morgan.

Clone this wiki locally