Skip to content

Commit

Permalink
Remove unnecessary errors package
Browse files Browse the repository at this point in the history
  • Loading branch information
kradalby committed Feb 15, 2021
1 parent 01e667b commit 74a4f70
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/go-kit/kit/log/level"
"github.com/gogo/protobuf/proto"
"github.com/golang/snappy"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/prometheus/prompb"
Expand Down Expand Up @@ -86,7 +85,7 @@ func NewConfiguredLogger(format string, logLevel string) (log.Logger, error) {
case "json":
logger = log.NewJSONLogger(os.Stdout)
default:
return nil, errors.Errorf("%s is not a valid log format", format)
return nil, fmt.Errorf("%s is not a valid log format", format)
}

var filterOption level.Option
Expand All @@ -100,7 +99,7 @@ func NewConfiguredLogger(format string, logLevel string) (log.Logger, error) {
case "error":
filterOption = level.AllowError()
default:
return nil, errors.Errorf("%s is not a valid log level", logLevel)
return nil, fmt.Errorf("%s is not a valid log level", logLevel)
}
logger = log.With(logger, "ts", log.DefaultTimestampUTC, "caller", log.Caller(5))
logger = level.NewFilter(logger, filterOption)
Expand Down

0 comments on commit 74a4f70

Please sign in to comment.