fix: log at Debug level in influx_tools compact-shard (#22848)

Closes https://github.com/influxdata/influxdb/issues/22846
pull/22929/head
davidby-influx 2021-11-08 16:50:48 -08:00 committed by GitHub
parent 1b03f7ec35
commit 3f7192ab3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import (
"github.com/influxdata/influxdb/pkg/limiter"
"github.com/influxdata/influxdb/tsdb/engine/tsm1"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
var (
@ -57,11 +58,12 @@ func (cmd *Command) Run(args []string) (err error) {
var log = zap.NewNop()
if cmd.verbose {
cfg := logger.Config{Format: "logfmt"}
cfg := logger.Config{Format: "logfmt", Level: zapcore.DebugLevel}
log, err = cfg.New(os.Stdout)
if err != nil {
return err
}
log.Info("Logging", zap.String("level", cfg.Level.String()))
}
fmt.Fprintf(cmd.Stdout, "opening shard at path %q\n\n", cmd.path)