improve caching and tracking #34
@ -26,14 +26,14 @@ type Format struct {
|
|||||||
Stdin bool `help:"Format the context passed in via stdin"`
|
Stdin bool `help:"Format the context passed in via stdin"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *Format) Configure() {
|
func ConfigureLogging() {
|
||||||
log.SetReportTimestamp(false)
|
log.SetReportTimestamp(false)
|
||||||
|
|
||||||
if f.Verbosity == 0 {
|
if Cli.Verbosity == 0 {
|
||||||
log.SetLevel(log.WarnLevel)
|
log.SetLevel(log.WarnLevel)
|
||||||
} else if f.Verbosity == 1 {
|
} else if Cli.Verbosity == 1 {
|
||||||
log.SetLevel(log.InfoLevel)
|
log.SetLevel(log.InfoLevel)
|
||||||
} else if f.Verbosity > 1 {
|
} else if Cli.Verbosity > 1 {
|
||||||
log.SetLevel(log.DebugLevel)
|
log.SetLevel(log.DebugLevel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,6 @@ var (
|
|||||||
func (f *Format) Run() (err error) {
|
func (f *Format) Run() (err error) {
|
||||||
stats.Init()
|
stats.Init()
|
||||||
|
|
||||||
Cli.Configure()
|
|
||||||
|
|
||||||
l := log.WithPrefix("format")
|
l := log.WithPrefix("format")
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
Reference in New Issue
Block a user