Skip to content

Commit

Permalink
slog: update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: He Xian <[email protected]>
  • Loading branch information
hexian000 committed Oct 15, 2024
1 parent 876ed46 commit 98c8886
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion v3/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ var Flags AppFlags
func ioClose(c io.Closer) {
if err := c.Close(); err != nil {
msg := fmt.Sprintf("close: %s", formats.Error(err))
slog.Output(2, slog.LevelWarning, msg)
slog.Output(2, slog.LevelWarning, nil, msg)
}
}
6 changes: 3 additions & 3 deletions v3/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ func (w *logWrapper) Write(p []byte) (n int, err error) {
const calldepth = 4
raw := strings.TrimSuffix(string(p), "\n")
if msg := strings.TrimPrefix(raw, "[ERR] "); len(msg) != len(raw) {
w.Output(calldepth, slog.LevelError, msg)
w.Output(calldepth, slog.LevelError, nil, msg)
} else if msg := strings.TrimPrefix(raw, "[WARN] "); len(msg) != len(raw) {
w.Output(calldepth, slog.LevelWarning, msg)
w.Output(calldepth, slog.LevelWarning, nil, msg)
} else {
w.Output(calldepth, slog.LevelError, string(p))
w.Output(calldepth, slog.LevelError, nil, string(p))
}
return len(p), nil
}
Expand Down
2 changes: 1 addition & 1 deletion v3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/hashicorp/yamux v0.1.2
github.com/hexian000/gosnippets v0.0.0-20241014142528-a84e37abf658
github.com/hexian000/gosnippets v0.0.0-20241015063812-7c5036e2a6b7
)

require (
Expand Down
4 changes: 2 additions & 2 deletions v3/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
github.com/hexian000/gosnippets v0.0.0-20241014142528-a84e37abf658 h1:DUKGsz/8MDOlDqb9uPnydR2PIKtj35tUMPnUv7DPNRM=
github.com/hexian000/gosnippets v0.0.0-20241014142528-a84e37abf658/go.mod h1:Rdyfp0dNWf7YDOm2wcPcFG8W7FCL/BV8aRQJZb9bvng=
github.com/hexian000/gosnippets v0.0.0-20241015063812-7c5036e2a6b7 h1:Wlajf8qGIYzTaJMVPtWejAALZRvu+YK+0XvMPBd2A/w=
github.com/hexian000/gosnippets v0.0.0-20241015063812-7c5036e2a6b7/go.mod h1:Rdyfp0dNWf7YDOm2wcPcFG8W7FCL/BV8aRQJZb9bvng=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand Down

0 comments on commit 98c8886

Please sign in to comment.