summaryrefslogtreecommitdiff
path: root/examples/cowsay/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cowsay/main.go')
-rw-r--r--examples/cowsay/main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/cowsay/main.go b/examples/cowsay/main.go
index 32ba2ea..3ada714 100644
--- a/examples/cowsay/main.go
+++ b/examples/cowsay/main.go
@@ -8,6 +8,7 @@ import (
"os"
"os/exec"
+ "github.com/go-kit/log/level"
sr "tildegit.org/tjp/sliderule"
"tildegit.org/tjp/sliderule/gemini"
"tildegit.org/tjp/sliderule/logging"
@@ -23,13 +24,13 @@ func main() {
log.Fatal(err)
}
- _, infoLog, _, errLog := logging.DefaultLoggers()
+ baseLog := logging.Base()
// add request logging to the request handler
- handler := logging.LogRequests(infoLog)(cowsayHandler)
+ handler := logging.LogRequests(level.Info(baseLog))(cowsayHandler)
// 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)
}