log.format, error reporting

This commit is contained in:
Lloyd Brookes
2016-07-01 20:53:10 +01:00
parent 3d521399f6
commit 3e54a492f7
6 changed files with 32 additions and 17 deletions

View File

@ -1,13 +1,13 @@
# Logging
By default, local-web-server outputs a simple, dynamic statistics view. To see traditional web server logs, use `--log-format`:
By default, local-web-server outputs a simple, dynamic statistics view. To see traditional web server logs, use `--log.format`:
```sh
$ ws --log-format combined
$ 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](https://github.com/expressjs/morgan). The exception is `--log-format none` which disables all output.
The format value supplied is passed directly to [morgan](https://github.com/expressjs/morgan). The exception is `--log.format none` which disables all output.
# Visualisation
@ -17,7 +17,7 @@ To get live statistics in [goaccess](http://goaccess.io/), first create this con
```
time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
log.format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
```
Then, start the server, outputting `combined` format logs to disk:

View File

@ -4,7 +4,7 @@ To get live statistics in [goaccess](http://goaccess.io/), first create this con
```
time-format %T
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
log.format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
```
Then, start the server, outputting `combined` format logs to disk: