Skip to content

Commit

Permalink
Add ssytem version to default logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Nov 20, 2024
1 parent ed9e511 commit 0f86d63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/ww/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/wetware/go/cmd/internal/export"
"github.com/wetware/go/cmd/internal/run"
"github.com/wetware/go/cmd/internal/serve"
"github.com/wetware/go/system"
)

func main() {
Expand Down Expand Up @@ -56,7 +57,9 @@ func main() {
}

func setup(c *cli.Context) error {
slog.SetDefault(slog.New(logger(c)))
log := slog.New(logger(c)).With(
"version", system.Proto.Version)
slog.SetDefault(log)
return nil
}

Expand Down

0 comments on commit 0f86d63

Please sign in to comment.