diff options
Diffstat (limited to 'examples/cowsay/main.go')
-rw-r--r-- | examples/cowsay/main.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/cowsay/main.go b/examples/cowsay/main.go index fc5e89f..b239019 100644 --- a/examples/cowsay/main.go +++ b/examples/cowsay/main.go @@ -9,8 +9,8 @@ import ( "os/exec" "tildegit.org/tjp/gus" - guslog "tildegit.org/tjp/gus/contrib/log" "tildegit.org/tjp/gus/gemini" + "tildegit.org/tjp/gus/logging" ) func main() { @@ -23,11 +23,13 @@ func main() { log.Fatal(err) } + _, infoLog, _, errLog := logging.DefaultLoggers() + // add request logging to the request handler - handler := guslog.Requests(os.Stdout, nil)(cowsayHandler) + handler := logging.LogRequests(infoLog)(cowsayHandler) // run the server - server, err := gemini.NewServer(context.Background(), tlsconf, "tcp4", ":1965", handler) + server, err := gemini.NewServer(context.Background(), errLog, tlsconf, "tcp4", ":1965", handler) if err != nil { log.Fatal(err) } |