diff options
Diffstat (limited to 'examples/inspectls/main.go')
-rw-r--r-- | examples/inspectls/main.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/inspectls/main.go b/examples/inspectls/main.go index d400fe9..f12fd65 100644 --- a/examples/inspectls/main.go +++ b/examples/inspectls/main.go @@ -12,6 +12,7 @@ import ( "os" "strings" + "github.com/go-kit/log/level" sr "tildegit.org/tjp/sliderule" "tildegit.org/tjp/sliderule/gemini" "tildegit.org/tjp/sliderule/logging" @@ -27,13 +28,13 @@ func main() { log.Fatal(err) } - _, infoLog, _, errLog := logging.DefaultLoggers() + baseLog := logging.Base() // add stdout logging to the request handler - handler := logging.LogRequests(infoLog)(inspectHandler) + handler := logging.LogRequests(level.Info(baseLog))(inspectHandler) // run the server - server, err := gemini.NewServer(context.Background(), "localhost", "tcp4", ":1965", handler, errLog, tlsconf) + server, err := gemini.NewServer(context.Background(), "localhost", "tcp4", ":1965", handler, baseLog, tlsconf) if err != nil { log.Fatal(err) } |