Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log tcp dump #3

Merged
merged 3 commits into from
Feb 5, 2019
Merged

Log tcp dump #3

merged 3 commits into from
Feb 5, 2019

Conversation

kazeburo
Copy link
Owner

@kazeburo kazeburo commented Feb 5, 2019

sample

mysql query

{"level":"info","ts":1549334617.628509,"caller":"dumper/dumper.go:57","msg":"dump","seq":1,"user-email":"","x-forwarded-for":"","remote-addr":"127.0.0.1:56047","destination":"mysql","upstream":"127.0.0.1:3306","direction":1,"hex":"1b 00 00 00 03 73 65 6c 65 63 74 20 2a 20 66 72 6f 6d 20 75 73 65 72 20 6c 69 6d 69 74 20 31","ascii":".....select * from user limit 1"}

http

{"level":"info","ts":1549334764.7622,"caller":"handler/handler.go:130","msg":"log","seq":1,"user-email":"","x-forwarded-for":"","remote-addr":"127.0.0.1:56170","destination":"plack","upstream":"127.0.0.1:8080","status":"Connected"}
{"level":"info","ts":1549334764.7641978,"caller":"dumper/dumper.go:57","msg":"dump","seq":1,"user-email":"","x-forwarded-for":"","remote-addr":"127.0.0.1:56170","destination":"plack","upstream":"127.0.0.1:8080","direction":1,"hex":"47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 31 32 37 2e 30 2e 30 2e 31 3a 31 38 30 30 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 63 75 72 6c 2f 37 2e 35 34 2e 30 0d 0a 41 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 0d 0a","ascii":"GET / HTTP/1.1..Host: 127.0.0.1:18000..User-Agent: curl/7.54.0..Accept: */*...."}
{"level":"info","ts":1549334764.764575,"caller":"dumper/dumper.go:57","msg":"dump","seq":1,"user-email":"","x-forwarded-for":"","remote-addr":"127.0.0.1:56170","destination":"plack","upstream":"127.0.0.1:8080","direction":2,"hex":"48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 44 61 74 65 3a 20 54 75 65 2c 20 30 35 20 46 65 62 20 32 30 31 39 20 30 32 3a 34 36 3a 30 34 20 47 4d 54 0d 0a 53 65 72 76 65 72 3a 20 50 6c 61 63 6b 3a 3a 48 61 6e 64 6c 65 72 3a 3a 53 74 61 72 6c 65 74 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 33 0d 0a 4f 4b 0a 0d 0a 30 0d 0a 0d 0a","ascii":"HTTP/1.1 200 OK..Date: Tue, 05 Feb 2019 02:46:04 GMT..Server: Plack::Handler::Starlet..Transfer-Encoding: chunked..Connection: close....3..OK...0...."}
{"level":"info","ts":1549334764.764603,"caller":"handler/handler.go:141","msg":"log","seq":1,"user-email":"","x-forwarded-for":"","remote-addr":"127.0.0.1:56170","destination":"plack","upstream":"127.0.0.1:8080","status":"Suceeded","read":79,"write":149,"disconnect_at":"upstream_read"}

@kazeburo kazeburo merged commit f072df4 into master Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant