Skip to content

Commit

Permalink
Merge pull request #1148 from wakatime/misc/remove-jww
Browse files Browse the repository at this point in the history
Remove spf13/jwalterweatherman reference
  • Loading branch information
gandarez authored Jan 2, 2025
2 parents 69d10ec + 88ecf4f commit 5949ada
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,6 @@ func SetupLogging(ctx context.Context, v *viper.Viper) (*log.Logger, error) {
log.WithMetrics(params.Metrics),
)

log.SetJww(params.Verbose, destOutput)

return logger, nil
}

Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ require (
github.com/pkg/sftp v1.13.7
github.com/slongfield/pyfmt v0.0.0-20220222012616-ea85ff4c361f
github.com/spf13/cobra v1.8.1
github.com/spf13/jwalterweatherman v1.1.0
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.11
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,12 @@ github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
Expand Down
12 changes: 0 additions & 12 deletions pkg/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"io"

jww "github.com/spf13/jwalterweatherman"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

Expand Down Expand Up @@ -119,17 +118,6 @@ func (l *Logger) Flush() {
}
}

// SetJww sets jww log when debug enabled.
func SetJww(verbose bool, w io.Writer) {
if verbose {
jww.SetLogThreshold(jww.LevelDebug)
jww.SetStdoutThreshold(jww.LevelDebug)

jww.SetLogOutput(w)
jww.SetStdoutOutput(w)
}
}

// Log logs a message at the given level.
func (l Logger) Log(level zapcore.Level, msg string) {
l.entry.Log(level, msg)
Expand Down

0 comments on commit 5949ada

Please sign in to comment.