diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-21 12:29:37 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-09-21 14:07:22 +0300 |
commit | 199c6104682079f057d9ff8b17e253e75a618e76 (patch) | |
tree | 386a81b151d9cbf1aad3ec40997cf91decb62a47 /internal/cli | |
parent | c4c19957bc6dba3b30c848459c7465cebbdee060 (diff) |
log: Remove Print and related functions from `Logger` interface
The function family `Print{,f,ln}()` is merely a wrapper of the
respective functions that log a message at info level. Despite being
duplicate, it's also not obvious what they are doing and not supported
by the `slog` package.
Remove these functions from the `Logger` interface and replace all their
usages with the respective info-level functions. As the Yamux library
expects a logger implementing these functions this commit implements a
wrapper that forwards the respective functions.
Diffstat (limited to 'internal/cli')
-rw-r--r-- | internal/cli/praefect/subcmd_dataloss.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/cli/praefect/subcmd_dataloss.go b/internal/cli/praefect/subcmd_dataloss.go index 80b3d7366..f685221a2 100644 --- a/internal/cli/praefect/subcmd_dataloss.go +++ b/internal/cli/praefect/subcmd_dataloss.go @@ -86,7 +86,7 @@ func datalossAction(ctx *cli.Context) error { } defer func() { if err := conn.Close(); err != nil { - logger.Printf("error closing connection: %v\n", err) + logger.Infof("error closing connection: %v\n", err) } }() |