improve caching and tracking #34

Merged
brianmcgee merged 5 commits from feat/improve-caching into main 2024-05-02 10:41:16 +00:00
3 changed files with 5 additions and 6 deletions
Showing only changes of commit fb9493884c - Show all commits

View File

@ -26,14 +26,14 @@ type Format struct {
Stdin bool `help:"Format the context passed in via stdin"`
}
func (f *Format) Configure() {
func ConfigureLogging() {
log.SetReportTimestamp(false)
if f.Verbosity == 0 {
if Cli.Verbosity == 0 {
log.SetLevel(log.WarnLevel)
} else if f.Verbosity == 1 {
} else if Cli.Verbosity == 1 {
log.SetLevel(log.InfoLevel)
} else if f.Verbosity > 1 {
} else if Cli.Verbosity > 1 {
log.SetLevel(log.DebugLevel)
}
}

View File

@ -43,8 +43,6 @@ var (
func (f *Format) Run() (err error) {
stats.Init()
Cli.Configure()
l := log.WithPrefix("format")
defer func() {

View File

@ -36,5 +36,6 @@ func main() {
}
ctx := kong.Parse(&cli.Cli)
cli.ConfigureLogging()
ctx.FatalIfErrorf(ctx.Run())
}