diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-10-09 08:58:31 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-10-09 08:58:31 -0600 |
commit | 20be557b7bc3d7ada78411b7b279c9f7580d0bc7 (patch) | |
tree | 2a7f6640b0b389ad79fe18a8906642be493aaf60 /examples/finger/main.go | |
parent | cedcf58ea7d729acb6ed1a9ab7aec1ae38aed102 (diff) |
logging.Base()
Allow users to get access to the base logger *before* it is wrapped with the various levels.
This provides a single override point to filter or redirect all logging.
Diffstat (limited to 'examples/finger/main.go')
-rw-r--r-- | examples/finger/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/finger/main.go b/examples/finger/main.go index 723e3e6..8cb6526 100644 --- a/examples/finger/main.go +++ b/examples/finger/main.go @@ -4,20 +4,20 @@ import ( "context" "log" + "github.com/go-kit/log/level" "tildegit.org/tjp/sliderule/finger" "tildegit.org/tjp/sliderule/logging" ) func main() { - _, infoLog, _, errLog := logging.DefaultLoggers() - + baselog := logging.Base() fs, err := finger.NewServer( context.Background(), "localhost", "tcp", ":79", - logging.LogRequests(infoLog)(finger.SystemFinger(false)), - errLog, + logging.LogRequests(level.Info(baselog))(finger.SystemFinger(false)), + logging.Base(), ) if err != nil { log.Fatal(err) |