Skip to content

Commit

Permalink
feat(log): use tint
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Dec 31, 2024
1 parent 3ee2939 commit 026c837
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/unspeech/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"github.com/labstack/echo/v4"
"github.com/lmittmann/tint"
slogecho "github.com/samber/slog-echo"
"github.com/spf13/cobra"

Expand All @@ -23,7 +24,7 @@ func main() {

e.HideBanner = true

e.Use(slogecho.New(slog.New(slog.NewTextHandler(os.Stdout, nil))))
e.Use(slogecho.New(slog.New(tint.NewHandler(os.Stdout, nil))))
e.Use(middlewares.CORS())
e.Use(middlewares.HandleErrors())

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require (
github.com/evanphx/json-patch/v5 v5.9.0
github.com/golang-module/carbon v1.7.3
github.com/labstack/echo/v4 v4.13.3
github.com/lmittmann/tint v1.0.6
github.com/nekomeowww/fo v1.4.0
github.com/samber/lo v1.47.0
github.com/samber/mo v1.13.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/labstack/echo/v4 v4.13.3 h1:pwhpCPrTl5qry5HRdM5FwdXnhXSLSY+WE+YQSeCaa
github.com/labstack/echo/v4 v4.13.3/go.mod h1:o90YNEeQWjDozo584l7AwhJMHN0bOC4tAfg+Xox9q5g=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/lmittmann/tint v1.0.6 h1:vkkuDAZXc0EFGNzYjWcV0h7eEX+uujH48f/ifSkJWgc=
github.com/lmittmann/tint v1.0.6/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
Expand Down

0 comments on commit 026c837

Please sign in to comment.