Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuchiki committed Nov 15, 2017
1 parent af90c1c commit 5abde3f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,31 @@ Flags:

### Apache

```diff
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T" combined
```

```console
$ cat logs/apache.access.log
127.0.0.1 - - [03/Sep/2017:12:23:39 +0000] "GET / HTTP/1.1" 403 3839 "-" "curl/7.47.1"
127.0.0.1 - - [03/Sep/2017:12:23:39 +0000] "GET / HTTP/1.1" 403 3839 "-" "curl/7.47.1" 1
$ cat logs/apache.access.log | ./log2ltsv --format apache
time:2017-09-03T12:23:39+00:00 user:- status:403 size:3839 method:GET uri:/ apptime:0
user:- time:2017-09-03T12:23:39+00:00 method:GET uri:/ status:403 size:3839 reqtime:1 apptime:1
```

### Nginx

```
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
+ '"$http_user_agent" "$http_x_forwarded_for" '
+ '$request_time $upstream_response_time';
```

```console
$ cat logs/nginx.access.log
127.0.0.1 - - [03/Sep/2017:12:21:17 +0000] "GET / HTTP/1.1" 200 3770 "-" "curl/7.47.1" "-"
127.0.0.1 - - [03/Sep/2017:12:21:17 +0000] "GET / HTTP/1.1" 200 3770 "-" "curl/7.47.1" "-" 0.0 0.1
$ cat logs/nginx.access.log | ./log2ltsv
time:2017-09-03T12:21:17+00:00 user:- status:200 size:3770 method:GET uri:/ apptime:0
user:- time:2017-09-03T12:21:17+00:00 method:GET uri:/ status:200 size:3770 reqtime:0.0 apptime:0.1
```
2 changes: 1 addition & 1 deletion logs/apache.access.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
127.0.0.1 - - [03/Sep/2017:12:23:39 +0000] "GET / HTTP/1.1" 403 3839 "-" "curl/7.47.1"
127.0.0.1 - - [03/Sep/2017:12:23:39 +0000] "GET / HTTP/1.1" 403 3839 "-" "curl/7.47.1" 1
2 changes: 1 addition & 1 deletion logs/nginx.access.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
127.0.0.1 - - [03/Sep/2017:12:21:17 +0000] "GET / HTTP/1.1" 200 3770 "-" "curl/7.47.1" "-"
127.0.0.1 - - [03/Sep/2017:12:21:17 +0000] "GET / HTTP/1.1" 200 3770 "-" "curl/7.47.1" "-" 0.0 0.1

0 comments on commit 5abde3f

Please sign in to comment.