From 02b90d195efbcb1c5416040151c3577b19f3eb22 Mon Sep 17 00:00:00 2001 From: Jeff Wendling Date: Thu, 26 Apr 2018 12:54:29 -0600 Subject: [PATCH] verify-seriesfile: update verbose logging --- cmd/influx_inspect/verify/seriesfile/command.go | 3 ++- cmd/influx_inspect/verify/seriesfile/verify.go | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmd/influx_inspect/verify/seriesfile/command.go b/cmd/influx_inspect/verify/seriesfile/command.go index f1b740d88d..7eb4cfbb37 100644 --- a/cmd/influx_inspect/verify/seriesfile/command.go +++ b/cmd/influx_inspect/verify/seriesfile/command.go @@ -56,8 +56,9 @@ func (cmd *Command) Run(args ...string) error { } config := logger.NewConfig() + config.Level = zapcore.WarnLevel if cmd.verbose { - config.Level = zapcore.DebugLevel + config.Level = zapcore.InfoLevel } logger, err := config.New(cmd.Stderr) if err != nil { diff --git a/cmd/influx_inspect/verify/seriesfile/verify.go b/cmd/influx_inspect/verify/seriesfile/verify.go index 194a6deb77..8655a28ff3 100644 --- a/cmd/influx_inspect/verify/seriesfile/verify.go +++ b/cmd/influx_inspect/verify/seriesfile/verify.go @@ -39,7 +39,7 @@ func NewVerify() Verify { // if there was some fatal problem with operating, not if there was a problem with the series file. func (v Verify) VerifySeriesFile(filePath string) (valid bool, err error) { v.Logger = v.Logger.With(zap.String("path", filePath)) - v.Logger.Debug("Verifying series file") + v.Logger.Info("Verifying series file") defer func() { if rec := recover(); rec != nil { @@ -111,7 +111,7 @@ func (v Verify) VerifySeriesFile(filePath string) (valid bool, err error) { // if there was some fatal problem with operating, not if there was a problem with the partition. func (v Verify) VerifyPartition(partitionPath string) (valid bool, err error) { v.Logger = v.Logger.With(zap.String("partition", filepath.Base(partitionPath))) - v.Logger.Debug("Verifying partition") + v.Logger.Info("Verifying partition") defer func() { if rec := recover(); rec != nil { @@ -183,7 +183,7 @@ type IDData struct { func (v Verify) VerifySegment(segmentPath string, ids map[uint64]IDData) (valid bool, err error) { segmentName := filepath.Base(segmentPath) v.Logger = v.Logger.With(zap.String("segment", segmentName)) - v.Logger.Debug("Verifying segment") + v.Logger.Info("Verifying segment") // Open up the segment and grab it's data. segmentID, err := tsdb.ParseSeriesSegmentFilename(segmentName) @@ -309,7 +309,7 @@ entries: // The ids map must be built from verifying the passed in segments. func (v Verify) VerifyIndex(indexPath string, segments []*tsdb.SeriesSegment, ids map[uint64]IDData) (valid bool, err error) { - v.Logger.Debug("Verifying index") + v.Logger.Info("Verifying index") defer func() { if rec := recover(); rec != nil {