Skip to content

Commit 4c6a93f

Browse files
committed
fix logging
1 parent db30bdd commit 4c6a93f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

enterprise/cli/dbcrypt_rotate.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"encoding/base64"
99

1010
"cdr.dev/slog"
11+
"cdr.dev/slog/sloggers/sloghuman"
1112

1213
"github.com/coder/coder/v2/cli"
1314
"github.com/coder/coder/v2/cli/clibase"
@@ -36,11 +37,7 @@ func (*RootCmd) dbcryptRotate() *clibase.Cmd {
3637
Handler: func(inv *clibase.Invocation) error {
3738
ctx, cancel := context.WithCancel(inv.Context())
3839
defer cancel()
39-
logger, closeLogger, err := cli.BuildLogger(inv, vals)
40-
if err != nil {
41-
return xerrors.Errorf("set up logging: %w", err)
42-
}
43-
defer closeLogger()
40+
logger := slog.Make(sloghuman.Sink(inv.Stdout))
4441

4542
if vals.PostgresURL == "" {
4643
return xerrors.Errorf("no database configured")

0 commit comments

Comments
 (0)