diff --git a/README.md b/README.md index b608df9..94b0245 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # go-http-log -Log all incoming HTTP requests + +Extremely basic Golang HTTP server that outputs all incoming requests + +### Usage + +1. [Install latest version of Go.](https://go.dev/doc/install) +2. Clone this repo and simply run the main.go file +```shell +go run main.go +``` diff --git a/main.go b/main.go index fba40b8..ea92507 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,8 @@ func main() { body = []byte("") } - slog.Info("Request", + slog.Info("Req", + "remote", r.RemoteAddr, "method", r.Method, "path", r.URL.Path, "query", r.URL.RawQuery,