Skip to content

Commit

Permalink
Amend logging fix
Browse files Browse the repository at this point in the history
commit-id:2c413bcd
  • Loading branch information
ejoffe committed Jul 7, 2021
1 parent a289e2f commit 1087f89
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/amend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"github.com/ejoffe/spr/git/realgit"
"github.com/ejoffe/spr/spr"
"github.com/jessevdk/go-flags"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)

var (
Expand All @@ -22,6 +24,11 @@ type opts struct {
Version bool `short:"v" long:"version" description:"Show version info."`
}

func init() {
zerolog.SetGlobalLevel(zerolog.InfoLevel)
log.Logger = log.With().Caller().Logger().Output(zerolog.ConsoleWriter{Out: os.Stderr})
}

func main() {
var opts opts
_, err := flags.Parse(&opts)
Expand Down

0 comments on commit 1087f89

Please sign in to comment.